speisekarten-quartz/quartz/components/styles/toc.scss
Jacky Zhao 5480269d38
perf(explorer): client side explorer (#1810)
* start work on client side explorer

* fix tests

* fmt

* generic test flag

* add prenav hook

* add highlight class

* make flex more consistent, remove transition

* open folders that are prefixes of current path

* make mobile look nice

* more style fixes
2025-03-09 14:58:26 -07:00

72 lines
1.1 KiB
SCSS

@use "../../styles/variables.scss" as *;
.toc {
display: flex;
flex-direction: column;
overflow-y: hidden;
flex: 0 1 auto;
&:has(button#toc.collapsed) {
flex: 0 1 1.2rem;
}
}
@media all and not ($mobile) {
.toc {
display: flex;
}
}
button#toc {
background-color: transparent;
border: none;
text-align: left;
cursor: pointer;
padding: 0;
color: var(--dark);
display: flex;
align-items: center;
& h3 {
font-size: 1rem;
display: inline-block;
margin: 0;
}
& .fold {
margin-left: 0.5rem;
transition: transform 0.3s ease;
opacity: 0.8;
}
&.collapsed .fold {
transform: rotateZ(-90deg);
}
}
#toc-content {
list-style: none;
position: relative;
& ul {
list-style: none;
margin: 0.5rem 0;
padding: 0;
& > li > a {
color: var(--dark);
opacity: 0.35;
transition:
0.5s ease opacity,
0.3s ease color;
&.in-view {
opacity: 0.75;
}
}
}
@for $i from 0 through 6 {
& .depth-#{$i} {
padding-left: calc(1rem * #{$i});
}
}
}