Skip to content

Commit

Permalink
Make sidebar sticky-ish
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcenteno committed Sep 11, 2024
1 parent 022c40c commit d4be3d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 0 additions & 4 deletions assets/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ li {
margin-bottom: calc(var(--mm-spacing) / 4);
}

li::marker {
color: #ccc;
}

blockquote {
color: var(--mm-color-primary-text);
padding: var(--mm-spacing);
Expand Down
12 changes: 11 additions & 1 deletion assets/scss/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
overflow-y: auto;
padding-bottom: 20px;
padding-left: 20px;

@media only screen and (min-width: 992px) {
height: calc(100vh - var(--page-header-height) - 60px);
position: sticky;
top: 130px;
}
}

.sidebar ul {
Expand All @@ -83,7 +89,7 @@
margin-top: 20px;

@media only screen and (min-width: 992px) {
margin-top: 50px;
margin-top: 0;
}
}

Expand Down Expand Up @@ -146,6 +152,10 @@
}
}

.sidebar__child + ul {
margin-top: 5px;
}

.sidebar__child-group {
background-color: var(--mm-color-sidebar);
margin-top: 0;
Expand Down

0 comments on commit d4be3d6

Please sign in to comment.