hugo-theme-paradox/assets/styles/components/nav-docs.scss
2022-12-18 08:10:54 -06:00

92 lines
1.4 KiB
SCSS

/* navigation menu toggle */
.toggle-menu {
display: none;
}
.toggle-menu:not(:checked) ~ .menu {
display: none;
}
.toggle-menu__label {
display: flex;
align-items: center;
font-weight: 900;
gap: 0.25rem;
text-transform: uppercase;
}
.toggle-menu__label {
margin-bottom: 2em
}
/* navigation menu */
.docs-nav {
padding: 1em 0;
#search-form {
margin-bottom: 2em;
}
.menu {
margin-top: 1em;
> li {
margin-bottom: 2em;
font-weight: 700;
}
> details summary {
margin-bottom: 1em;
}
display: flex;
flex-flow: column;
}
details {
display: flex;
margin-bottom: 1em;
&[open] {margin-bottom: 2em;}
}
summary {
font-weight: 700;
cursor: pointer;
}
.sub-menu {
margin-left: 1em;
display: flex;
flex-flow: column;
gap: 0.5rem;
li {
line-height: 1.5;
}
.sub-menu {
margin-top: 0.5rem;
margin-left: 2em;
}
li::marker {
content: '';
}
.sub-menu li::marker {
content: '';
}
li.active::marker {
content: '';
}
}
.active > a {
font-weight: 700;
text-decoration: none;
color: var(--ui-text-bold);
transition:
color var(--color-crossfade-duration) var(--color-crossfade-ease);
}
}
/* top of menu link should show only when focused */
#menu {margin-bottom: 1em;}
#menu:not(:focus) {
clip: rect(0 0 0 0);
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}