Closed toastal closed 3 months ago
There is indeed a long history of it but I don't foresee a version of normalize shipping with the strategy. That ability to not use the sizes and roll your own is exactly the path to take if you're calculating rems to pixel equivalents.
Thanks for pinging and asking! Going to close for now.
https://snook.ca/archives/html_and_css/font-size-with-rem https://www.freecodecamp.org/news/override-root-font-size-for-a-better-user-experience/ https://medium.com/@jagadishkamuni/respecting-font-size-preferences-rems-and-62-5-base-font-size-aleksandr-hovhannisyan-f0473d6c8410
There is a long history of doing
html { font-size: 62.5% } body { font-size: 1.6rem }
in projects as most (but not all!) user agents have 16px as the default base font. Resizing the base from 16 to 10 makes it a lot easier to work withrem
units outside of--size-*
as it is just a base10 decimal point shift away from the given design size. It’s been a good practice to userem
s for many sizings as this project does since the default user agent is respected, however, in practice, I very often find myself with designs to implement whose sizes are always using pixels (from Figma or other software). Doing the conversions from24px
to1.5rem
is a much slower exercise than converting24px
to2.4rem
. It’s been slow enough that on more than one project I have used Open Props already, I swapped out the entire sizes file & converted everything to lighten the burden of reading/translating designs in practice.Seeing that there is a 2.x on the horizon, I am curious if this has been considered. I appreciate that most values in the project are
rem
-based for respecting user agents, but I would personally love to see62.5%
as I did not see any existing discussions anywhere about the topic as a gauge of interest.