Skip to content
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

Bugfix: Fix font variable ordering for proper font-weight calculation in IE11 #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mitchellma
Copy link

Fixes #127 and possibly #138.

The character calculation is off in IE11 because font-weight is not properly applied as IE11 requires strict adherence to the font string docs with font-weight after font-style (https://developer.mozilla.org/en-US/docs/Web/CSS/font#formal_syntax).

So in IE11 'normal 700 28pt Arial' (font-weight after style) results in bolded text, same as bolded '700 28pt Arial' .
Screen Shot 2021-09-23 at 10 55 51 AM
Screen Shot 2021-09-23 at 10 56 20 AM

but '700 normal 28pt Arial' (font-weight before style) is not bolded, same as not bolded 'normal 28pt Arial'.
Screen Shot 2021-09-23 at 10 56 49 AM
Screen Shot 2021-09-23 at 11 31 08 AM

Chrome and Firefox don't have this issue since they do some parsing on the style string even interpreting 700 to 'bold' before computing the css so IE11 is just special.

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

Successfully merging this pull request may close these issues.

ellipsis still display when text isn't too long
1 participant