Design comparison
Solution retrospective
First attempt at nested CSS. Despite lack of support in samsung mobile will be attempting to include this more often on practice work.
At first I only updated the appropriate fields with the JSON data but it made more sense to me to dynamically create the entire list. The downside to this is the colours etc only work based on the exact name matching that of the category, would have liked to include some random generation of colours for any extra fields.
Adding extra objects to the JSON stretches the content with no fallback currently.
Community feedback
- @danielmrz-devPosted 8 months ago
Hello @Tomcourt89!
Your solution looks great!
I have a suggestion:
- Since you set grid to the body, but you didn't set the size of the rows, your footer is pushing your card up a little bit. You can prevent that from happening adding this to the body:
grid-template-rows: 90% 1fr;
Then your card will always occupy 90% of the space and the footer will adapt in the remaining space.
I hope it helps!
Other than that, you did an excellent job!
Marked as helpful1
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