Imagine the following NavigationMenuItem component:
@inherits NavLink
<div>
<NavLink ActiveClass="navigationmenuitem-active" @attributes="@AdditionalAttributes">
@ChildContent
</NavLink>
</div>
I want to be able to set the ActiveClass attribute of the NavLink via style isolation.
Is this somehow possible?
I got the style to work when defining the class for the ActiveClass globally but I don't really like having global styles.
I found a workaround by not using the ActiveClass attribute and instead going with ::deep a.active in the isolated css file. But this feels wrong.
So is there a way where I can use ActiveClass the way I intend it to?
ActiveClass="nav-link-active"and then added to the component css class::deep .nav-link-active { background-color:blueviolet;}It worked - lurid purple when active. I'm assuming you understand::deep. - MrC aka Shaun Curtis::deepon the class itself. It makes so much sense! If you'd provide your comment as an answer I'll accept it! - Manuel Zelenka