hugo-theme-zzo/assets/sass/components/_toc.scss

72 lines
1.3 KiB
SCSS
Raw Normal View History

2019-11-04 13:09:44 +00:00
.toc {
width: 100%;
max-width: 250px;
position: fixed;
top: 7rem;
2019-11-04 13:09:44 +00:00
font-size: 0.85rem;
padding-left: 0.5rem;
z-index: z('toc');
2019-11-04 13:09:44 +00:00
#toc {
position: relative;
}
&__flexbox {
@include flexbox();
@include align-items(center);
position: fixed;
}
2019-11-04 13:09:44 +00:00
&__title {
font-size: 0.9rem;
margin-top: 0.5rem;
2019-11-04 13:09:44 +00:00
@include themify($themes) {
color: themed('toc-label-color');
}
}
a {
color: inherit;
position: relative;
&::before {
@include themify($themes) {
background-color: themed('toc-vertical-line');
}
content: '';
height: 100%;
left: -1rem;
margin-top: -1px;
position: absolute;
width: 2px;
&:last-child {
background-color: transparent;
}
}
}
ul {
@include themify($themes) {
li {
li {
margin-left: 1rem;
color: themed('sidebar-li-color');
}
}
a {
color: themed('toc-title-color');
}
}
}
.active {
@include themify($themes) {
color: themed('link-hover');
font-weight: 700;
&::before {
background-color: themed('toc-vertical-line-active');
}
}
}
}