LoveIt/assets/css/_partial/_single/_toc.scss

145 lines
2.4 KiB
SCSS

.toc {
.toc-title {
font-size: $toc-title-font-size;
font-weight: bold;
text-transform: uppercase;
}
.toc-content {
font-size: $toc-content-font-size;
ul {
text-indent: -0.85rem;
padding-left: .8rem;
list-style: none;
a::before {
content: "|";
font-weight: bolder;
margin-right: .5rem;
color: $single-link-color;
.dark & {
color: $single-link-color-dark;
}
}
ul {
padding-left: 1.5rem;
}
}
}
ruby {
background: $code-background-color;
rt {
color: $global-font-secondary-color;
}
.dark & {
background: $code-background-color-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
}
#toc-auto {
display: block;
position: absolute;
width: $MAX_LENGTH;
padding: 0 .8rem;
border-left: 4px solid $global-border-color;
overflow-wrap: break-word;
box-sizing: border-box;
top: if($header-normal-mode-desktop, 5rem, 10rem);
left: $MAX_LENGTH;
@include blur;
.dark & {
border-left: 1px solid $global-border-color-dark;
}
.toc-title {
margin: .8rem 0;
}
.toc-content {
&.always-active ul {
display: block;
}
> nav > ul {
margin: .625rem 0;
}
ul {
ul {
display: none;
}
.has-active > ul {
display: block;
}
}
a.active {
font-weight: bold;
color: $single-link-color;
.dark & {
color: $single-link-color-dark;
}
&::before {
color: $single-link-hover-color;
.dark & {
color: $single-link-hover-color-dark;
}
}
}
}
}
#toc-static {
display: none;
margin: .8rem 0;
.toc-title {
display: flex;
justify-content: space-between;
line-height: 2em;
padding: 0 .75rem;
background: darken($code-background-color, 3%);
.dark & {
background: darken($code-background-color-dark, 3%);
}
&:hover {
background: darken($code-background-color, 6%);
.dark & {
background: darken($code-background-color-dark, 5%);
}
}
}
.toc-content {
background-color: $code-background-color;
> nav > ul {
margin: 0;
padding: .4rem 1rem .4rem 1.8rem;
}
.dark & {
background-color: $code-background-color-dark;
}
}
}