Skip to content

Instantly share code, notes, and snippets.

@adi518
Created September 20, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adi518/5d13a82be758fc7a5fb935c8f5826c0a to your computer and use it in GitHub Desktop.
Save adi518/5d13a82be758fc7a5fb935c8f5826c0a to your computer and use it in GitHub Desktop.
// https: //css-tricks.com/couple-takes-sticky-footer/
@mixin sticky-footer($master-container, $header-container, $content-container, $footer-container) {
@at-root {
html {
height: 100%;
}
#{$master-container} {
display: flex;
flex-direction: column;
height: 100vh;
/* Avoid the IE 10-11 `min-height` bug. */
}
#{$content-container} {
flex: 1 0 auto;
/* Prevent Chrome, Opera, and Safari from letting these items shrink to smaller than their content's default minimum size. */
}
#{$header-container},
#{$footer-container} {
flex-shrink: 0;
/* Prevent Chrome, Opera, and Safari from letting these items shrink to smaller than their content's default minimum size. */
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment