Created
October 11, 2016 22:38
-
-
Save rugor/f9b8e86cebd278fc8a8ce6874c35a847 to your computer and use it in GitHub Desktop.
SCSS: Familiar mixins #rugor
This file contains hidden or 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 below($width) { | |
@media screen and (max-width: $width - 1) { | |
@content; | |
} | |
} | |
@mixin above($width) { | |
@media screen and (min-width: $width + 1) { | |
@content; | |
} | |
} | |
@mixin transition($transition-property, $transition-time, $method) { | |
-webkit-transition: $transition-property $transition-time $method; | |
-moz-transition: $transition-property $transition-time $method; | |
-ms-transition: $transition-property $transition-time $method; | |
-o-transition: $transition-property $transition-time $method; | |
transition: $transition-property $transition-time $method; | |
} | |
@mixin vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment