-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
www.google.com - "Speaker" icon is misaligned #8635
Comments
This is a tricky one, but via remote debugging I can see that Firefox and Chrome are using different fonts on my phone, and so the page's use of So technically this seems to be site error, since there's basically no expectation that browsers will ever select the same font or "normal" line-height. They should explicitly set values that will end up having the same x-height (same font, font-size, line-height, etc), or just use flexbox to vertically align instead. |
The spec for https://developer.mozilla.org/en-US/docs/Web/CSS/line-height#Values says "Depends on the user agent. Desktop browsers (including Firefox) use a default value of roughly 1.2, depending on the element's font-family." |
I guess it partially falls into the bug https://bugzilla.mozilla.org/show_bug.cgi?id=1392147 |
@foolip @wisniewskit let's make it a webcompat tip :) https://twitter.com/webcompat/status/918250862899691520 |
Little HTML page to highlight normal v 1.2 v 1.2em: |
I took one more look at this, to better summarize what's going wrong. This is the basic markup:
The page attempts to use
If I fix those four things (specify Roboto, specify parent span height=line-height=21px, specify the margin's top and bottom equally), then both browsers align the speaker properly. As such I don't really consider this a webcompat issue so much as site error (relying on Blink-specific behavior), as relying on the non-engine-specific approach (matching heights/line-heights, even margins, vertical-align:middle) seems to work just fine. That said, it does seem like there is interop work to be done with respect to |
Tangential to the actual appearance, but technically https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height says the computed value should be |
Indeed I can no longer reproduce the issue. |
URL: https://www.google.com/?gfe_rd=cr&gws_rd=ssl,cr&fg=1
Browser / Version: Firefox Mobile Nightly 57.0a1 (2017-08-02) with Chrome UA
Operating System: LG G5 (Android 7.0) - Resolution 1440 x 2560 pixels (~554 ppi pixel density)
Tested Another Browser: Yes
Problem type: Design is broken
Description: "Speaker" icon is misaligned
Steps to Reproduce:
Expected Behavior:
Speaker icon is centered.
Actual Behavior:
Speaker icon is misaligned.
Note:
Watchers:
@softvision-sergiulogigan
@softvision-oana-arbuzov
sv; gs
From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: