Design comparison
SolutionDesign
Solution retrospective
I present to you my solution for this challenge, I hope you like it. I was tempted to use JavaScript because I wanted the card's shadow to change when hovering over the title. However, I later realized that it cannot be done with CSS because you cannot modify a parent element in response to an event from a child element. I am glad to continue enriching my knowledge with each challenge and the support of your comments.
Community feedback
- @crsimpson5Posted 11 months ago
Hey Oscar,
There kinda is a "parent selector" in CSS now. Check out the
:has()
selector.Try something like this:
.card:has(.card__title:hover) { ... }
Nice job 👍
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