Skip to content

Commit 8451c23

Browse files
committed
Fix sidebar overlap for small width devices
This resolves a jarring text overlap issue with the sidebar by only adjusting the `max-height` at larger widths, which matches the original rule being overridden. Fixes #3049
1 parent c95aa1c commit 8451c23

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

assets-hugo/scss/custom.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ Custom SCSS for the Matrix spec
4545
scroll-behavior: smooth;
4646
overscroll-behavior: contain;
4747

48-
/* This overrides calc(100vh - 10rem);, which gives us a blank space at the bottom of the sidebar */
49-
max-height: calc(100vh - 6rem);
50-
5148
&>.td-sidebar-nav__section {
5249
margin-top: 1rem;
5350
}
@@ -92,6 +89,15 @@ Custom SCSS for the Matrix spec
9289
}
9390
}
9491

92+
@media (min-width: 768px) {
93+
@supports (position: sticky) {
94+
.td-sidebar-nav {
95+
/* This overrides calc(100vh - 10rem);, which gives us a blank space at the bottom of the sidebar */
96+
max-height: calc(100vh - 6rem);
97+
}
98+
}
99+
}
100+
95101
/* Customise footer */
96102
footer {
97103
box-shadow: 0px 0px 8px rgba(179, 179, 179, 0.25);

0 commit comments

Comments
 (0)