LoveIt/assets/css/_partial/_single/_toc.scss
Dillon aed8734d83
feat(shortcode): add mapbox shortcode (#190)
* feat(shortcode): add mapbox shortcode

* docs: split shortcodes into built-in shortcodes and extended shortcodes

* docs(shortcodes): add docs for mapbox shortcode

* docs(shortcodes): fix an error in shortcodes docs
2020-03-21 16:59:23 +08:00

164 lines
2.6 KiB
SCSS

#toc-auto {
display: block;
position: absolute;
width: 1000px;
padding: 0 .8rem;
border-left: 1px solid $global-border-color;
overflow-wrap: break-word;
box-sizing: border-box;
top: if($header-normal-mode-desktop, 5rem, 10rem);
left: 10000px;
.dark-theme & {
border-left: 1px solid $global-border-color-dark;
}
.toc-title {
font-weight: 400;
margin: .8rem 0;
text-transform: uppercase;
}
.toc-content {
&.always-active ul {
display: block;
}
>nav>ul {
margin: .625rem 0;
}
ul {
text-indent: -0.85rem;
padding-left: .625rem;
list-style: none;
a::before {
content: "|";
font-weight: bolder;
margin-right: .5rem;
color: $single-link-color;
.dark-theme & {
color: $single-link-color-dark;
}
}
ul {
padding-left: 1.25rem;
display: none;
}
.has-active > ul {
display: block;
}
}
a.active {
font-weight: bold;
color: $single-link-color;
.dark-theme & {
color: $single-link-color-dark;
}
&::before {
color: $single-link-hover-color;
.dark-theme & {
color: $single-link-hover-color-dark;
}
}
}
}
}
#toc-static {
display: none;
margin: .8rem 0;
details {
summary {
list-style: none;
background: darken($code-background-color, 3%);
.dark-theme & {
background: darken($code-background-color-dark, 3%);
}
.toc-title {
display: block;
display: flex;
justify-content: space-between;
font-weight: bold;
line-height: 2em;
padding: 0 .625rem;
i.details {
line-height: 2em;
}
&:hover {
cursor: pointer;
}
}
&::-webkit-details-marker {
display: none;
}
}
}
details[open] {
i.details {
transform: rotate(180deg);
}
}
.toc-content {
background-color: $code-background-color;
> nav > ul {
margin: 0;
padding: .4rem .8rem;
}
ul {
list-style: none;
ul {
padding-left: 1.25rem;
}
}
.dark-theme & {
background-color: $code-background-color-dark;
}
}
}
.toc {
.toc-title {
font-size: $toc-title-font-size;
}
.toc-content {
font-size: $toc-content-font-size;
}
ruby {
background: $code-background-color;
rt {
color: $global-font-secondary-color;
}
.dark-theme & {
background: $code-background-color-dark;
rt {
color: $global-font-secondary-color-dark;
}
}
}
}