Design comparison
SolutionDesign
Solution retrospective
- I definitely have repeated and redundant CSS code. How do you go about it to ensure minimal CSS code?
- My code is definitely not mobile responsive. Any help on how to go about that would be appreciated.
Community feedback
- @p-tamPosted 10 months ago
Nice work on the usage of semantic HTML tags and structuring your code.
In regards to the DRY principle I would suggest to avoid using id as a selector for the CSS styling where possible. An example includes:
#ingredients, #instructions, #nutrition { padding: 20px; }
Instead, to create reusable styling you can do
.section-padding { padding: 20px }
This way you can apply that CSS class to all the sections that require this styling without creating a bunch of IDs.
Marked as helpful1@elameendaiyabuPosted 10 months ago@p-tam Thank you for the feedback. I see the point you made and I will definitely improve on it.
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