1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

docs: hide the quickstart and doc nav bar links when you're on the docs pages (#6126)

This change hides the quickstart and doc nav bar links when you're on
the docs pages.

This gets around the issue of both of those links being
highlighted when you're on the docs pages.

This should work on 91.66% of browsers (according to [canIUse's data for
the `:has` selector](https://caniuse.com/?search=%3Ahas)). For older
browsers, the links will still be visible.
This commit is contained in:
Thomas Heartman 2024-02-06 11:51:40 +09:00 committed by GitHub
parent 3bea6bbd20
commit 9646cfe4e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -74,13 +74,13 @@ module.exports = {
type: 'doc',
position: 'right',
docId: 'quickstart',
label: 'Quickstart',
html: '<span class="hide-when-active">Quickstart</span>',
},
{
type: 'doc',
position: 'right',
docId: 'welcome',
label: 'Docs',
html: '<span class="hide-when-active">Docs</span>',
},
{
type: 'dropdown',
@ -122,7 +122,7 @@ module.exports = {
{
label: 'Managing Unleash for DevOps/Admins',
href: 'https://docs.google.com/forms/d/1JlIqmXI3P7dj0n-OiUs2IYsYXgmqw23BChaemlSgHJA/viewform',
},
},
],
},
{

View File

@ -34,6 +34,10 @@
color: var(--unleash-navbar-font-color);
}
.navbar .navbar__link--active:has(.hide-when-active) {
display: none;
}
.navbar button[class*='toggleButton_']:hover
{
background: var(--unleash-navbar-active-background-color);