You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
3.0 KiB
Plaintext
145 lines
3.0 KiB
Plaintext
.toc-offcanvas {
|
|
position: fixed;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
top: 0;
|
|
right: 0;
|
|
z-index: 220;
|
|
margin: 0;
|
|
height: 100vh;
|
|
min-width: 275px;
|
|
max-width: 80%;
|
|
box-shadow: 1px 0 8px 0 rgba(0, 0, 0, 0.35);
|
|
transform: translate3d(100%, 0, 0);
|
|
transition: opacity 250ms ease-in-out, transform 250ms ease-in-out;
|
|
will-change: transform;
|
|
overflow-y: auto;
|
|
background-color: #eaecf0;
|
|
scrollbar-width: thin;
|
|
padding-top: env(safe-area-inset-top, 0);
|
|
padding-bottom: env(safe-area-inset-bottom, 0);
|
|
padding-right: env(safe-area-inset-right, 0);
|
|
|
|
> ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
a.list-item {
|
|
text-decoration: none;
|
|
|
|
&:hover,
|
|
&:active,
|
|
&:focus,
|
|
&:visited {
|
|
color: #54595d;
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
.list-item {
|
|
display: block;
|
|
color: #54595d;
|
|
background-color: #fff;
|
|
border-top: 1px solid #eaecf0;
|
|
max-width: 100%;
|
|
padding: 12px 10px 12px 15px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
|
|
.title {
|
|
margin-inline-start: 10px;
|
|
}
|
|
|
|
&:active {
|
|
background-color: #ccc;
|
|
}
|
|
|
|
&:first-of-type {
|
|
border-top: none;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
&:last-of-type {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
&.active {
|
|
box-shadow: inset 4px 0 0 0 #3366cc;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.toc-offcanvas-cover {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
opacity: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.8);
|
|
z-index: 210;
|
|
transition: opacity 250ms linear;
|
|
will-change: opacity;
|
|
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
body.toc-offcanvas-show {
|
|
overflow-y: hidden;
|
|
|
|
.toc-offcanvas {
|
|
visibility: visible;
|
|
}
|
|
|
|
#mw-overscroll-bottom-cover {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
body.toc-offcanvas-open {
|
|
.toc-offcanvas-cover {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.toc-offcanvas {
|
|
transform: translate3d(0, 0, 0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
|
|
// 深色模式补丁
|
|
.skin-citizen-dark {
|
|
.toc-offcanvas {
|
|
background-color: var(--color-surface-2);
|
|
|
|
> ul {
|
|
a.list-item {
|
|
text-decoration: none;
|
|
|
|
&:hover,
|
|
&:active,
|
|
&:focus,
|
|
&:visited {
|
|
color: var(--color-base);
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
.list-item {
|
|
color: var(--color-base);
|
|
background-color: var(--color-surface-0);
|
|
border-top: 1px solid var(--border-color-base);
|
|
|
|
&:active {
|
|
background-color: var(--color-surface-1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |