Skip to content

Instantly share code, notes, and snippets.

@mattdanielbrown
Created December 22, 2016 20:19
Show Gist options
  • Select an option

  • Save mattdanielbrown/e0ea5f32998e62de68fc833f1d1e062a to your computer and use it in GitHub Desktop.

Select an option

Save mattdanielbrown/e0ea5f32998e62de68fc833f1d1e062a to your computer and use it in GitHub Desktop.
/*
* Set to fullscree size mixin
*
* @param ($exactHeight: false)
*
* $exactHeight: [true | false ] -
* Whether or not the element must only be the exact height of
* the window, and no more.
* (!Optional) default = false
* ... if false, `min-height` property is set to 100vh, so element can be taller
* than the window and must only be at least that tall.
* ... if true, `height` property is set to 100vh, so the element must be
* EXACTLY the height of the window, NO MORE, NO LESS.
*/
@mixin fullscreen($exactHeight: false) {
width: 100%;
margin: 0;
padding: 0;
@if($exactHeight == true) {
height: 100vh;
} @else {
min-height: 100vh;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment