I'm proud that I customized the card to fit my style, refined the state styles (hover
, focus
, active
), and improved accessibility for keyboard navigation.
The main challenge was styling the parent <li>
when its child <a>
was in :focus
or :active
. I tried :focus-within
, which worked in most cases, but :has()
is not yet fully supported across all browsers.
I’d love to learn best practices for styling parent elements based on the state of their children, especially in terms of accessibility and keyboard navigation.