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
This commit is contained in:
Sorin Davidoi 2018-02-15 00:24:39 +01:00 committed by Michael Bryan
parent 6961247f56
commit 89a5dbaf9a
2 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@ table thead td {
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
overscroll-behavior-y: contain;
-webkit-transition: -webkit-transform 0.5s; -webkit-transition: -webkit-transform 0.5s;
-moz-transition: -moz-transform 0.5s; -moz-transition: -moz-transform 0.5s;
-o-transition: -o-transform 0.5s; -o-transition: -o-transform 0.5s;

View File

@ -11,6 +11,7 @@
font-size: 0.875em font-size: 0.875em
box-sizing: border-box box-sizing: border-box
-webkit-overflow-scrolling: touch -webkit-overflow-scrolling: touch
overscroll-behavior-y: contain;
// Animation: slide away // Animation: slide away
transition: transform 0.5s transition: transform 0.5s