hugo-theme-paradox/assets/styles/components/nav-docs.scss

92 lines
1.5 KiB
SCSS
Raw Permalink Normal View History

/* 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;
}
2022-12-18 14:10:54 +00:00
.toggle-menu__label {
2022-12-23 11:21:41 +00:00
margin-block-end: 2em
2022-12-18 14:10:54 +00:00
}
/* navigation menu */
.docs-nav {
2022-12-23 11:21:41 +00:00
padding-block: 1em;
2022-12-18 14:10:54 +00:00
#search-form {
2022-12-23 11:21:41 +00:00
margin-block-end: 2em;
2022-12-18 14:10:54 +00:00
}
.menu {
2022-12-23 11:21:41 +00:00
margin-block-start: 1em;
2022-12-18 14:10:54 +00:00
> li {
2022-12-23 11:21:41 +00:00
margin-block-end: 2em;
2022-12-18 14:10:54 +00:00
font-weight: 700;
}
> details summary {
2022-12-23 11:21:41 +00:00
margin-block-end: 1em;
2022-12-12 01:46:24 +00:00
}
2022-12-18 14:10:54 +00:00
display: flex;
flex-flow: column;
2022-12-12 01:46:24 +00:00
}
details {
2022-12-18 14:10:54 +00:00
display: flex;
2022-12-23 11:21:41 +00:00
margin-block-end: 1em;
&[open] {margin-block-end: 2em;}
2022-12-12 01:46:24 +00:00
}
summary {
font-weight: 700;
cursor: pointer;
}
.sub-menu {
2022-12-23 11:21:41 +00:00
margin-inline-start: 1em;
2022-10-16 22:15:34 +00:00
display: flex;
flex-flow: column;
gap: 0.5rem;
li {
line-height: 1.5;
}
2022-10-16 22:49:29 +00:00
.sub-menu {
2022-12-23 11:21:41 +00:00
margin-block-start: 0.5rem;
margin-inline-start: 2em;
2022-10-16 22:49:29 +00:00
}
li::marker {
2022-10-16 22:15:34 +00:00
content: '';
}
.sub-menu li::marker {
content: '';
}
2022-12-18 14:10:54 +00:00
li.active::marker {
content: '';
}
}
2022-12-12 01:46:24 +00:00
.active > a {
font-weight: 700;
text-decoration: none;
2022-12-18 14:10:54 +00:00
color: var(--ui-text-bold);
transition:
color var(--color-crossfade-duration) var(--color-crossfade-ease);
}
}
/* top of menu link should show only when focused */
2022-12-23 11:21:41 +00:00
#menu {margin-block-end: 1em;}
#menu:not(:focus) {
clip: rect(0 0 0 0);
clip-path: inset(50%);
2022-12-23 11:21:41 +00:00
block-size: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
2022-12-23 11:21:41 +00:00
inline-size: 1px;
}