react-truncate icon indicating copy to clipboard operation
react-truncate copied to clipboard

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

Open mitchellma opened this issue 2 years ago • 0 comments

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.

mitchellma avatar Sep 23 '21 18:09 mitchellma