
Testimonial Grid Section Responsive Layout using Grid and Media Query
Design comparison
Solution retrospective
Getting more comftable with CSS grid and media query. I would explore in the future using Javascript to dynamically adjust sizing and location of components.
What challenges did you encounter, and how did you overcome them?I got into an issue where my CSS for the part of individual styling of cards is becoming more lengthy. Luckily I was able solve it by building a more robust selector by just utilizing locally declared custom properties. By creating a locally scoped variables, I was able to modularize individual cards.
.testimonial-card:nth-of-type(1) {
--testimonial-bg: hsl(var(--clr-purple-500));
--testimonial-highlight-clr: hsl(var(--clr-white));
--testimonial-detail-clr: hsl(var(--clr-purple-50));
--author-name-clr: hsl(var(--clr-white));
--author-status-clr: hsl(var(--clr-purple-50));
--img-border-clr: hsl(264, 82%, 70%);
}
taking advantage of shared styles such as the ff:
/*shared styles for author info texts*/
.author-name {
color: var(--author-name-clr);
}
.author-status {
color: var(--author-status-clr);
}
There are many more robust solution and even more outside of plain CSS, but this gets the job done for now.
What specific areas of your project would you like help with?I would love see any feedback on responsiveness and maybe further recommendations that I may check out for.
Community feedback
- @Mathieu-310Posted 19 days ago
Hello!
You did it :) great job!!
✔ You forgot to add the title of the page
✔ You used h1, h2 and then hide them in css, I guess you're worried about accessibility, but I think here it's just a block and in it there are divisions just to be able to style them and so there's not really a need to use semantic tags. Indeed semantic tags are parts of a website in their own right but here it's just a single block so you can give it a semantic tag and the rest used generic tags for style reasons. So you shouldn't use semantic tags anywhere, you should rather understand the major sections of the website and use them if necessary.
Happy coding 🥰
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