Open object505 opened 8 years ago
Ah okay, so what we should do here is also check for an explicit percentage font size on html.
Not sure when I'd be able to get to that, happy to take a PR though.
I know it's been awhile but I do want to add that while html { font-size: 10px; font-size: 62.5%; }
does resolve the issue for px
based font sizing, it does not seem to work correctly when using rem
based sizing.
Has any progress been made on checking for global size, or even just the ability to modify the responsive-type rootSize
?
I had the min and max font size set with
rem
units and been using the62.5%
hack to reset font-size to10px
. What I noticed is that using this setup made the plugin wrongly calculated the responsive resizing of the fonts. After searching in the source code I noticed therootSize
variable that was set to16px
and all calculations for the resizing of the font were made with that value and the fonts kept on growing/shrinking beyond the max/min size set for the font. Further down the code I found where an override for therootSize
is set. Basically it searches for thehtml
tag and then checks if thefont-size
is explicitly set withpx
units. So in order everything to work with the62.5%
hack first set thefont-size
withpx
and then use the hack or just leave it with10px
:html { font-size: 10px; font-size: 62.5%; }
Would be also a good thing to add this to the readme file for future reference.
BTW, great plugin 👍