The Rem 62.5% bug- 1 min
More sites are using relative units like
rem instead of pixels. The common approach is like this:
The reason why people would use 62.5% is that it is easier to calculate rem, but there is a bug in chrome, that is, even if you’ve set the html font size to 62.5%(10px), later rem will still calculate based on 12px.
To be honest, I kinda of agree with this article and this one, that setting the html to 62.5% font size is not the perfect solution, let alone rem is not functional in some browsers. To avoid the chrome bug, I set the font-size of html to 100%, but I still believe that there should be a better solution.
One possible solution is to use preprocessors to do all the math for you. But there is still problems with the line-height and margin, padding.