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