Last active
December 30, 2015 09:49
-
-
Save ntreadway/7811510 to your computer and use it in GitHub Desktop.
Hide and show Sass mixins for optimized device performance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin show-it { | |
height: auto; | |
visibility: visible; | |
@include opacity(1); // Compass mixin | |
} | |
@mixin hide-it { | |
position: absolute; | |
-webkit-transform: translate3d(-9999rem,0,0); | |
-moz-transform: translate3d(-9999rem,0,0); | |
transform: translate3d(-9999rem,0,0); | |
@include opacity(0); // Compass mixin | |
} | |
// Used in Yeti Media's Castrum grid https://github.com/Yeti-Media/generator-castrum | |
@mixin respond($size, $type:min-width) { | |
@media only screen and ($type: $size) { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage for iPhone: