@MelvinAguilar
Posted
Hello there 👋. Good job on completing the challenge !
-
Your issue is that you've set
a.active
in yourHeader.module.css
file, but remember that when elements are rendered, React automatically assigns a unique name to that class. So, your class might look something likea._active_10909_45
, and such a class doesn't exist because<NavLink>
adds the.active
class without changing its name. That's why you'll never see the active link turn whiter.To solve that issue and avoid the problem, you could use the
[class="active"]
selector to prevent React from changing the class name and match the one set by NavLink:.header nav a[class="active"] img { filter: brightness(300%); }
I hope you find it useful! 😄
Happy coding!
Marked as helpful
@waldekglaz
Posted
@MelvinAguilar
excellent stuff, thank you for your help.