9110 shaares
215 private links
215 private links
The browser provides a default text size based on user preferences, and our text should be relative to that preference. Establishing our root font-size with an em value helps keep that relationship intact.
About the definition of one rem:
I really do want sites to usually just give me text around 24px (or ‘large’), because that’s a pretty good default for me.
Sites with smaller body text would ideally increase their font size, but sites with the same size or larger text certainly shouldn’t get even bigger.
Yes I share this assumption.
I slightly better approach:
html {
font-size: clamp(1em, 0.9em + 1vw, 1.5em);
}