Design comparison
Solution retrospective
I'm not confident on my understanding of em and rem.
What specific areas of your project would you like help with?I want to know if there are any more improvements specially on my use of units.
Community feedback
- @gilotinPosted 27 days ago
-
Pixels are fixed units and if you want everything to scale with your font you must use rem even in the border-box and radius. In your <body> you have font size if 16px this is unnecessary because this is default size. Rem are dependent to default font size , em is dependent to parent size. If you want to make something to scale specifically to it's parent you should use em. Overall your units are perfect as it is. But if someone wants to use accessibility options to force bigger font size, your border-box and radius won't scale.
-
I've noticed that you are trying to use BEM naming convention, but I think you don't know it perfectly. BEM - block , elements, modifier Is used that way block__element--modifier. Example: hero__header--red You write everytime modifier , you should provide more context to that modifier and latter in the code you are writing - Card__author__image, you can represent that as card, author__image or card__author-image . You can check here.
1 -
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