rust-lang-zh_CN/theme/pagetoc.css
2023-04-12 20:07:48 +08:00

63 lines
1.3 KiB
CSS

@media only screen and (max-width:1439px) {
.sidetoc {
display: none;
}
#search-toggle {
display: none;
}
}
@media only screen and (min-width:1440px) {
main {
position: relative;
margin-left: calc((100% - var(--content-max-width))/2 - 140px) !important;
}
.sidetoc {
margin-left: auto;
margin-right: auto;
left: calc(100% + (var(--content-max-width))/4 - 160px);
position: absolute;
}
.pagetoc {
position: fixed;
width: 320px;
height: calc(100vh - var(--menu-bar-height) - 0.67em * 4);
overflow: auto;
}
.pagetoc a {
border-left: 1px solid var(--sidebar-bg);
color: var(--fg) !important;
display: block;
padding-bottom: 5px;
padding-top: 5px;
padding-left: 10px;
text-align: left;
text-decoration: none;
}
.pagetoc a:hover,
.pagetoc a.active {
background: var(--sidebar-bg);
color: var(--sidebar-fg) !important;
}
.pagetoc .active {
background: var(--sidebar-bg);
color: var(--sidebar-fg);
}
.pagetoc .pagetoc-H2 {
padding-left: 20px;
}
.pagetoc .pagetoc-H3 {
padding-left: 40px;
}
.pagetoc .pagetoc-H4 {
padding-left: 60px;
}
.pagetoc .pagetoc-H5 {
display: none;
}
.pagetoc .pagetoc-H6 {
display: none;
}
}