fix jumping scrollbar

This commit is contained in:
Alex Grintsvayg 2016-07-11 22:08:49 -04:00
parent bd2da50c3e
commit 283fef2a62
2 changed files with 16 additions and 7 deletions

View file

@ -139,4 +139,12 @@ $font-body: 'Raleway', sans-serif;
width:1px; width:1px;
height:1px; height:1px;
overflow:hidden; overflow:hidden;
}
@mixin jumpingScrollbarFix() {
// Fix for jumping scrollbar: https://aykevl.nl/2014/09/fix-jumping-scrollbar
@media screen and (min-width: 35em) {
margin-left: calc(100vw - 100%);
margin-right: 0;
}
} }

View file

@ -4,15 +4,16 @@ $color-nav-border: #ddd;
.header .header
{ {
width: 100%; padding: 15px 0;
padding: 15px 0; @include clearfix();
@include clearfix(); position: relative;
position: relative; z-index: 1;
z-index: 1; .icon-close { display: none; }
.icon-close { display: none; } @include jumpingScrollbarFix();
} }
.header-absolute .header-absolute
{ {
width: 100%;
position: absolute; position: absolute;
} }
.header-scroll .header-scroll
@ -122,7 +123,7 @@ $color-nav-border: #ddd;
border-top: 1px $color-nav-border solid; border-top: 1px $color-nav-border solid;
border-bottom: 1px $color-nav-border solid; border-bottom: 1px $color-nav-border solid;
padding: $spacing-vertical / 2 0; padding: $spacing-vertical / 2 0;
width: 100%; @include jumpingScrollbarFix();
} }
.footer-img-link .footer-img-link
{ {