Skip to content

Commit 89a5dba

Browse files
sorin-davidoiMichael-F-Bryan
authored andcommitted
fix(theme/stylus/sidebar): Contain scrolling to the sidebar (#612)
> A position fixed left navigation bar does not want to hand off scrolling to the document because a scroll gesture performed on the navigation bar is almost never meant to scroll the document. In this case, the author can use contain on the sidebar to prevent scrolling from being chained to the parent document element. https://wicg.github.io/overscroll-behavior/#motivating-examples
1 parent 6961247 commit 89a5dba

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/theme/book.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ table thead td {
7171
-moz-box-sizing: border-box;
7272
box-sizing: border-box;
7373
-webkit-overflow-scrolling: touch;
74+
overscroll-behavior-y: contain;
7475
-webkit-transition: -webkit-transform 0.5s;
7576
-moz-transition: -moz-transform 0.5s;
7677
-o-transition: -o-transform 0.5s;

src/theme/stylus/sidebar.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
font-size: 0.875em
1212
box-sizing: border-box
1313
-webkit-overflow-scrolling: touch
14+
overscroll-behavior-y: contain;
1415

1516
// Animation: slide away
1617
transition: transform 0.5s

0 commit comments

Comments
 (0)