Skip to content

Commit 73de93d

Browse files
committed
Fix content scrolling
1 parent c7770c2 commit 73de93d

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

docs/sliver-docs/styles/globals.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ body {
1313
scrollbar-gutter: stable both-edges;
1414
}
1515

16+
/*
17+
Keep html as the single scrolling element. Setting overflow on both html
18+
and body breaks sticky sidebar behavior on docs/tutorial pages.
19+
*/
20+
html {
21+
overflow-y: scroll;
22+
}
23+
1624
/* Fallback for engines that do not support scrollbar-gutter. */
1725
@supports not (scrollbar-gutter: stable) {
18-
html,
19-
body {
26+
html {
2027
overflow-y: scroll;
2128
}
2229
}
@@ -26,8 +33,7 @@ body {
2633
scrollbar appears/disappears. Keep the page scrollbar track persistent.
2734
*/
2835
@media (min-width: 1024px) {
29-
html,
30-
body {
36+
html {
3137
overflow-y: scroll;
3238
}
3339
}

0 commit comments

Comments
 (0)