Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relative units clarification #20

Closed
marcelmoreau opened this issue May 31, 2021 · 1 comment
Closed

relative units clarification #20

marcelmoreau opened this issue May 31, 2021 · 1 comment

Comments

@marcelmoreau
Copy link

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 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.

@cat-a-flame
Copy link
Owner

Hi!
You got a point there! I will fix it soon! Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants