-
-
Notifications
You must be signed in to change notification settings - Fork 372
Closed
Description
I'm really new to (p)react, and one of the first thing I noticed is that the Link to the active page is not highligthed as it should be seeing the code. I tried to investigate and I found out that the css classes generated for the client is suffixed with the hash of the current file to isolate class. The problem is that not only the 'root' class imported is suffixed, but the '.active' from '.header nav a.active' is also suffixed and that the activeClassName only append 'active' and not 'active__xxxxx' to the html tag.
CSS wanted to be applied:
.header nav a.active {
background: rgba(255,255,255,0.4);
}
CSS generated for the client:
.header__3QGkI nav a.active__3gItZ {
background: rgba(255,255,255,0.4);
}
Sample of jsx for the Link:
<Link activeClassName="active" href="/">Home</Link>
Generated HTML on an active page:
<a href="/" class="active">Home</a>
Metadata
Metadata
Assignees
Labels
No labels