Design comparison
Solution retrospective
The instructions indicate that they are 15px for the letters, but from there with the rest of the page, as well as for the titles and so on, should the size of the letters be changed with em?
Community feedback
- @AlexBueckigPosted about 5 years ago
You are right, but I'd recommend using
rem
overem
for thefont-size
. When usingem
forfont-size
the value always refers to the elements parentfont-size
and calculates its size according to it. Usingrem
(abbreviation forroot-em
) always looks at the root element (html-tag) and calculates its size from there. (Remember: Using em for margin and padding always refer to the actual elementsfont-size
, not the parents.)This makes it easier if you want to change the font-size in media queries because you mostly just need to change the html's
font-size
and all the other font-sizes scale accordingly. The parts where you actually need to manually adjust the font-sizes will be a lot less using this approach.2 - @mattstuddertPosted about 5 years ago
Nice work on this challenge! As @AlexBueckig mentioned, I'd also recommend
rem
overem
, it's much easier to control. Even though thestyle-guide.md
mentions15px
for the regular text, I'd still size it inrem
. The15px
is just there as a reference.I hope you enjoyed the challenge!
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord