
Design comparison
Community feedback
- P@gabeiPosted 10 days ago
Nice job! I think the max-width of the grid could be a little larger on desktop, but otherwise looks great! I just thought of something that I'll share with you also because I found it interesting:
You used
nth-child
property to style the different testimonial sections. If we were to add a variable amount of sections, but still wanted them to alternate colors, we could use thenth-child(an+b)
operation to determine a set of colors to alternate through.I made a codepen to demonstrate. The syntax is
nth-child(4n+b)
, representing that we want to alternate through 4 colors.Anyway - I hope you also found this interesting. Happy coding!
Marked as helpful1@JasonPBurkePosted 10 days ago@gabei thanks for the feedback! You're right that I wasn't considering future changes or expansions, but of course that's important. And the codepen was a nice touch to show what you ment in action. I really appreciate it! Have a good one!
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