Design comparison
Solution retrospective
Getting more familiar with using nested CSS.
Spent a lot of time extracting as much unique CSS as I could to avoid duplication across multiple sections.
Would like to look at using this approach from the start, rather than cleaning up afterwards.
Community feedback
- @LucianoDLimaPosted 10 months ago
Well done on complething this challenge!
CSS sure has come a long way, nice to see someone using its new features, :has and containers are so powerful!
As a tip, it is not recommended to use px units when dealing with media queries, you should use rem or, even slighly better, em. This article explains why, even showing examples of what happens when you use px as opposed to rem or em
0@robmeijerPosted 10 months ago@LucianoDLima Thanks for the feedback, it's greatly appreciated!
That article is almost 8 years old, and I have based my mark-up on a more recent article that claims it's fine to use px, depending on whether or not you want the breakpoints to scale with the font size. I tested it with different font sizes, and I am happy with how it is.
What do you think?
1@LucianoDLimaPosted 10 months ago@robmeijer
Very interesting read, I'd still argue for em/rem but I can see now that it really doesn't matter that much, if at all, in this case. I tested on my end too and it worked perfectly (chrome browser)
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