Skip to content

Instantly share code, notes, and snippets.

@janzikmund
Last active May 28, 2019 07:57
Show Gist options
  • Save janzikmund/e572b8982904a2c11ee9655b28337e09 to your computer and use it in GitHub Desktop.
Save janzikmund/e572b8982904a2c11ee9655b28337e09 to your computer and use it in GitHub Desktop.
SCSS mixins for sass
// antialiased text
@mixin antialiased() {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// recount pixels to em
@function em($pixels, $context: $default-font-size) {
@return #{$pixels/$context}em;
}
// transition
@mixin transition ($property: all, $time: 0.3s, $easing: ease-out) {
transition: $property $time $easing 0s;
}
// rotate animation
// .el { animation: spin 2s infinite linear; }
@keyframes spin {
from {transform:rotate(0deg);}
to {transform:rotate(359deg);}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment