Skip to content

Commit a9bc0cb

Browse files
committed
fixed nav scrolling
1 parent 903e792 commit a9bc0cb

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/assets/styles.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ body > main > nav {
105105
background-color: var(--nav-bg-color);
106106
color: var(--nav-fg-color);
107107
display: inline-block;
108-
height: 100%;
108+
height: calc(100vh - var(--header-height));
109109
left: 0;
110110
overflow: auto;
111111
padding-right: 1rem;
112-
position: absolute;
112+
position: fixed;
113+
top: var(--header-height);
113114
transition-duration: 0.5s;
114115
transition-property: left;
115116
width: fit-content;
@@ -254,6 +255,10 @@ table th {
254255
margin-top: 0;
255256
}
256257

258+
body > main > nav {
259+
display: none;
260+
}
261+
257262
body > main > .topic-background {
258263
background-color: transparent;
259264
display: block;

0 commit comments

Comments
 (0)