3 ms·
Mastering the CSS rem unit: All units are made equal, sort of.
- anonymouz 14y agoA possible counterpoint: http://stackoverflow.com/questions/11799236/should-i-use-px-or-rem-in-my-css http://stackoverflow.com/questions/11799236/should-i-use-px-...
- ludwigw 14y agoAlluded to in the article is why 'px for everything', is not better than 'rems'. Sure, browsers now scale everything up when users zoom, but that doesn't give me, the author, control. I don't have the ability to bump up/down all the text on the page by the same ratio at certain viewport sizes. If I wanted to do this, I'd have to rewrite every 'px' value. The main point in that counterpoint is that 'px' give greater clarity when authoring CSS, which isn't truly. 'rems' also allow you to use one unit for everything. A 'rem' is a 'rem' is whatever I make a 'rem' in my html{}. A 'px' is a 'px' is whatever a 'px' is at 96dpi. No matter what I do.