Skip to content

Commit

Permalink
Limit sticky/scroll of toc to .lg and up breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdesmet committed Apr 27, 2023
1 parent 74c8242 commit 33e0c6b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions _sass/_toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
font-family: $font-family-base;
font-size: 0.9rem;
color: $text-muted;
position: sticky;
top: 2rem;
right: 0;
overflow-y: auto;
max-height: calc(100vh - 2rem); // Allow scroll within toc
margin-bottom: 2rem;

// Side navigation on larger pages
@include media-breakpoint-up(lg) {
position: sticky;
top: 2rem;
right: 0;
overflow-y: auto;
max-height: calc(100vh - 2rem); // Allow scroll within toc
}

h6 {
border-bottom: 1px solid $text-muted;
padding-bottom: 0.5rem;
Expand Down

0 comments on commit 33e0c6b

Please sign in to comment.