Skip to content

Instantly share code, notes, and snippets.

@rugor
Created October 11, 2016 22:38
Show Gist options
  • Save rugor/f9b8e86cebd278fc8a8ce6874c35a847 to your computer and use it in GitHub Desktop.
Save rugor/f9b8e86cebd278fc8a8ce6874c35a847 to your computer and use it in GitHub Desktop.
SCSS: Familiar mixins #rugor
@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