Skip to content

Commit

Permalink
Make ToC scrollable in slides if it overflows
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgio committed Sep 24, 2024
1 parent d59b54b commit fadf4ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core/src/main/resources/render/theme/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,20 @@ nav {
text-align: start;
}

/* ToC is scrollable in slides. */
.reveal nav {
overflow-y: scroll;
max-height: 50vh;
}

.reveal nav > ol {
/*
Content is clipped for some reason when overflow-y is enabled,
but this isn't needed if the list hides markers.
*/
margin-left: 24px;
}

h1#table-of-contents {
text-align: start;
}
Expand Down
6 changes: 6 additions & 0 deletions core/src/main/resources/render/theme/layout/minimal.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ nav li {
margin: 4px 0;
}

.reveal nav > ol {
/* Resets the no-clipping workaround because this theme's ToC hides list markers. */
margin-left: auto;
}


/* Footer */

.page-margin-bottom-center {
Expand Down

0 comments on commit fadf4ed

Please sign in to comment.