In Gatsby, when a new page is selected in the navigation, the aria-current=‘page’ attribute is added to it.
This can be used to style the current active page as follows:
a[aria-current="page"] {
color: green;
}
1 min read
How to highlight the active page in Gatsby JS
In Gatsby, when a new page is selected in the navigation, the aria-current=‘page’ attribute is added to it.
This can be used to style the current active page as follows:
a[aria-current="page"] {
color: green;
}