You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Good example sizes a paragraph's font-size at 1rem. It might be explained that rem font-size is relative to the font-size of the root element(:root or <html>), not <body>. If a user took the existing example to their project, but modified their <body>'s font-size, they might wonder "why does my paragraph's 1rem font-size not match my 22px?" Here is an example of that: https://codepen.io/marcelmoreau/pen/NWpXPEq
This might be made more clear by changing the example's body selector to html and removing the font-size: 16px from it.
Also, it might also be more clear to change the formula from size / base-font-size to desired-size / root-font-size
I am happy to make a PR for this, but wanted to run it by you first before I do all that.
The text was updated successfully, but these errors were encountered:
I am not sure if you think this warrants a PR.
https://csshell.dev/posts/lets-talk-about-units/
The Good example sizes a paragraph's
font-size
at1rem
. It might be explained thatrem
font-size is relative to the font-size of the root element(:root
or<html>
), not<body>
. If a user took the existing example to their project, but modified their<body>
's font-size, they might wonder "why does my paragraph's 1rem font-size not match my 22px?" Here is an example of that: https://codepen.io/marcelmoreau/pen/NWpXPEqThis might be made more clear by changing the example's
body
selector tohtml
and removing thefont-size: 16px
from it.Also, it might also be more clear to change the formula from
size / base-font-size
todesired-size / root-font-size
I am happy to make a PR for this, but wanted to run it by you first before I do all that.
The text was updated successfully, but these errors were encountered: