Last active
September 27, 2016 21:21
-
-
Save p810/8a2c3b6001bfa258da956e07336bc2af to your computer and use it in GitHub Desktop.
Using content blocks with mixins (SCSS).
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 keyframes($name) { | |
@-webkit-keyframes #{$name} { | |
@content; | |
} | |
@-moz-keyframes #{$name} { | |
@content; | |
} | |
@-o-keyframes #{$name} { | |
@content; | |
} | |
@keyframes #{$name} { | |
@content; | |
} | |
} | |
.foo { | |
@include keyframes(testAnimation) { | |
from { | |
opacity: 0; | |
} to { | |
opacity: 1; | |
} | |
} | |
animation: testAnimation 0.2s ease-in-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment