Skip to content

Commit b4e47a8

Browse files
fix: 调整目录框位置和最大高度以改善布局
Signed-off-by: wangsimiao1 <wangsimiao1@xiaomi.com>
1 parent 4b35dfe commit b4e47a8

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

_sass/layout/_panel.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
@use '../abstracts/placeholders';
44

55
.access {
6-
top: 3rem;
76
padding-top: 3rem;
8-
position: -webkit-sticky;
9-
position: sticky;
107

118
> section {
129
@extend %panel-border;
@@ -24,6 +21,18 @@
2421
}
2522

2623
#panel-wrapper {
24+
position: -webkit-sticky;
25+
position: sticky;
26+
top: 3rem;
27+
align-self: start;
28+
max-height: calc(100vh - 3rem);
29+
overflow-y: auto;
30+
scrollbar-width: none;
31+
32+
&::-webkit-scrollbar {
33+
display: none;
34+
}
35+
2736
/* the headings */
2837
.panel-heading {
2938
font-family: inherit;

_sass/pages/_post.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,7 @@ header {
261261
}
262262

263263
#toc-wrapper {
264-
top: 0;
265-
transition: top 0.2s cubic-bezier(0.22, 1, 0.36, 1);
266-
overflow-y: auto;
267-
max-height: 100vh;
268-
scrollbar-width: none;
269-
margin-top: 2rem;
264+
padding-top: 2rem;
270265

271266
&:not(.invisible) {
272267
-webkit-animation: fade-up 0.8s;

0 commit comments

Comments
 (0)