4 ms·
I think you are missing the main point : default text size IS a size in pixel. If my memory serves me right, the default text size is 16px for chrome (not sure
by elpince 6y ago
I think you are missing the main point : default text size IS a size in pixel.
If my memory serves me right, the default text size is 16px for chrome (not sure about other browsers).
Be it rem, em they are sizes relative to an ancestor.
rem being the root ancestor (html selector or browser default), and em being the closest ancestor having an absolute value defined for its font-size property.
Em is great when you want to establish a font size hierarchy in some container for example.
You can test rem by setting media queries defining different font-size values.
You'll see that 1.75rem is always exactly 175% of root element's font-size value.
- danShumway 6y agoThat is a point, but it's not a point that matters. It's no different then saying "oh, but browser pixels eventually resolve down to physical screen pixels, so it's the same thing." The problem here isn't whether or not font size eventually at some point in the browser is getting set to pixels -- it's who sets it. Is the browser setting it? Is the user? And is your layout equipped to handle it when it changes?