Skip to content

Instantly share code, notes, and snippets.

@andreasvirkus
Created April 22, 2017 10:12
Show Gist options
  • Save andreasvirkus/d837a425ecc1b986bfdab6532749f6e5 to your computer and use it in GitHub Desktop.
Save andreasvirkus/d837a425ecc1b986bfdab6532749f6e5 to your computer and use it in GitHub Desktop.
/**
* Fixes the content shift caused by disappearing/appearing scrollbars
*
* Inspired by https://aykevl.nl/2014/09/fix-jumping-scrollbar
*/
@media screen and (min-width: 25em) {
html {
margin-left: calc(100vw - 100%);
margin-right: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment