website-zola/sass/parts/_toc.scss

25 lines
540 B
SCSS
Raw Normal View History

2024-09-11 21:22:13 +02:00
.toc-container {
.toc-title {
cursor: pointer;
position: relative;
padding-left: 20px; // Space for the arrow
&:before {
content: ''; // Down arrow
position: absolute;
left: 0;
transition: transform 0.3s ease; // Smooth transformation
}
&:hover:before,
&.expanded:before {
transform: rotate(180deg); // Arrow points up when expanded or on hover
}
}
.toc-list {
display: none; // ToC is hidden by default
// Removed transition on display, not effective
}
}