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

148 lines
2.4 KiB
SCSS
Raw Normal View History

.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;
2020-04-27 19:38:22 +02:00
[theme=dark] & {
color: $single-link-color-dark;
}
}
ul {
padding-left: 1.5rem;
}
}
}
ruby {
background: $code-background-color;
rt {
color: $global-font-secondary-color;
}
2020-04-27 19:38:22 +02:00
[theme=dark] & {
background: $code-background-color-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
}
2020-02-21 04:11:56 +01:00
#toc-auto {
2020-01-31 15:53:04 +01:00
display: block;
position: absolute;
width: $MAX_LENGTH;
2020-02-02 07:43:29 +01:00
padding: 0 .8rem;
border-left: 4px solid $global-border-color;
@include overflow-wrap(break-word);
2020-01-31 15:53:04 +01:00
box-sizing: border-box;
top: if($header-normal-mode-desktop, 5rem, 10rem);
left: $MAX_LENGTH;
2020-01-31 15:53:04 +01:00
@include blur;
2020-04-27 19:38:22 +02:00
[theme=dark] & {
border-left-color: $global-border-color-dark;
2020-01-31 15:53:04 +01:00
}
2020-02-21 04:11:56 +01:00
.toc-title {
2020-02-02 07:43:29 +01:00
margin: .8rem 0;
2020-01-31 15:53:04 +01:00
}
2020-02-21 04:11:56 +01:00
.toc-content {
2020-01-31 15:53:04 +01:00
&.always-active ul {
display: block;
}
> nav > ul {
2020-01-31 15:53:04 +01:00
margin: .625rem 0;
}
ul {
ul {
display: none;
}
.has-active > ul {
display: block;
}
}
a.active {
2020-01-31 15:53:04 +01:00
font-weight: bold;
color: $single-link-color;
2020-01-31 15:53:04 +01:00
2020-04-27 19:38:22 +02:00
[theme=dark] & {
color: $single-link-color-dark;
2020-01-31 15:53:04 +01:00
}
&::before {
2020-02-13 18:30:33 +01:00
color: $single-link-hover-color;
2020-01-31 15:53:04 +01:00
2020-04-27 19:38:22 +02:00
[theme=dark] & {
2020-02-13 18:30:33 +01:00
color: $single-link-hover-color-dark;
2020-01-31 15:53:04 +01:00
}
}
}
}
}
2020-02-21 04:11:56 +01:00
#toc-static {
2020-01-31 15:53:04 +01:00
display: none;
margin: .8rem 0;
2020-01-31 15:53:04 +01:00
.toc-title {
display: flex;
justify-content: space-between;
line-height: 2em;
padding: 0 .75rem;
2020-04-27 19:38:22 +02:00
background: darken($code-background-color, 6%);
2020-04-27 19:38:22 +02:00
[theme=dark] & {
background: darken($code-background-color-dark, 6%);
2020-01-31 15:53:04 +01:00
}
}
2020-02-21 04:11:56 +01:00
.toc-content {
background-color: $code-background-color;
2020-01-31 15:53:04 +01:00
> nav > ul {
margin: 0;
padding: .4rem 1rem .4rem 1.8rem;
2020-01-31 15:53:04 +01:00
}
2020-04-27 19:38:22 +02:00
[theme=dark] & {
background-color: $code-background-color-dark;
2020-01-31 15:53:04 +01:00
}
}
2020-04-27 19:38:22 +02:00
&.open {
.toc-title {
background: darken($code-background-color, 3%);
[theme=dark] & {
background: darken($code-background-color-dark, 3%);
}
}
}
2020-01-31 15:53:04 +01:00
}