Skip to content

Is it CSS "feature" or bug? #2382

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

Closed
Nadya678 opened this issue Mar 3, 2018 · 3 comments
Closed

Is it CSS "feature" or bug? #2382

Nadya678 opened this issue Mar 3, 2018 · 3 comments

Comments

@Nadya678
Copy link

Nadya678 commented Mar 3, 2018

IE11 and EDGE:

https://jsfiddle.net/uu2n39eo/

IMHO 300 should be correct. I also measure the div in pixels and result is 293 instead of 300.

@jonjohnjohnson
Copy link

Guessing if the most recent version of any browser doesn't return 300 for width, then you should file a bug report with that specific browser.

@AmeliaBR
Copy link
Contributor

AmeliaBR commented Mar 4, 2018

Many browsers will have minimum font-size settings that will override the font-size:0.75px setting on the root element, which will then of course throw off your em sizing.

That said, for IE & Edge, it appears to be more of a rounding error: they only keep one decimal place, so that a font-size: 0.75px is treated as font-size: 0.7px.

Of course, you should never be setting unreadably small font sizes, and it is explicitly allowed in the CSS Font specs that when rendering text, the actual font-size can be adjusted as necessary for good rendering. However, that only applies to the actual font-size used for text rendering, not to the computed font-size that is inherited and used for em/rem units.

If you have practical examples of scaling layout elements with em units, where the font-size rounding in Edge/IE throws off the correct layout, then file a bug on the browser.

@fantasai fantasai closed this as completed Mar 4, 2018
@Nadya678
Copy link
Author

Nadya678 commented Mar 4, 2018

@AmeliaBR, on many sites I use <html/>: line-size:0.75px switched to 1px at 400px width screen, On <body/> I set 1600% (it means switching 8/12/16px regarding screen width (media query).

My client has added an application layer to the application and "THE EXPLORER AGAIN"....
We found that we can use 0.6/0.8/1px for explorer/edge instead of 0.5px/0.75px/1px as rem.

Thank you for answer and confirmation.

BTW. Please standardize, If browser cannot support too small fonts, the browser should only RENDER bigger font but definition should be not overriden in getComputedStyle (and also IE doesn't override) and if used 1600% or 16 rem, the browser should calculate ORIGINAL value.

BTW. It proves: The EDGE 12 is 12th version of IE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants