← Back to context

Comment by joestrouth1

3 days ago

My point was that there is only one root font size on a given page and it's trivial to find out what that is by looking in dev tools. It does not matter if it was set by the browser's user-agent stylesheet or an authored stylesheet or what units it was set in. You can simply look up its computed value.

What use case is that not sufficient for? What kind of nightmare page are you styling where code you don't control is dynamically changing the root font size? Why do you need its exact computed value at all? The whole point of REMs is to style based on relative proportions to the text size e.g. when text is size X, buttons should have x padding on top/bottom and 2x on the sides. If the user sets their preferred font size to another value I do not care.

I use rems I don't love them but it's less worse unit we have. My point was more on grid being convoluted and media queries with arbitrary values like media (max-width: 32rem)