-
-
Save neekey/5574476 to your computer and use it in GitHub Desktop.
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
@include keyframes(appear-and-roundify) { | |
0% { opacity: 0; @include border-radius(2px); } | |
100% { opacity: 1; @include border-radius(10px); } | |
} |
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
@-moz-keyframes appear-and-roundify { 0% { opacity: 0; -moz-border-radius: 2px; border-radius: 2px; } | |
100% { opacity: 1; -moz-border-radius: 10px; border-radius: 10px; } } | |
@-webkit-keyframes appear-and-roundify { 0% { opacity: 0; -webkit-border-radius: 2px; border-radius: 2px; } | |
100% { opacity: 1; -webkit-border-radius: 10px; border-radius: 10px; } } | |
@-o-keyframes appear-and-roundify { 0% { opacity: 0; -o-border-radius: 2px; border-radius: 2px; } | |
100% { opacity: 1; -o-border-radius: 10px; border-radius: 10px; } } | |
@-ms-keyframes appear-and-roundify { 0% { opacity: 0; -ms-border-radius: 2px; border-radius: 2px; } | |
100% { opacity: 1; -ms-border-radius: 10px; border-radius: 10px; } } | |
@keyframes appear-and-roundify { 0% { opacity: 0; border-radius: 2px; } | |
100% { opacity: 1; border-radius: 10px; } } |
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, | |
$moz: $experimental-support-for-mozilla, | |
$webkit: $experimental-support-for-webkit, | |
$o: $experimental-support-for-opera, | |
$ms: $experimental-support-for-microsoft, | |
$khtml: $experimental-support-for-khtml, | |
$official: true) | |
{ | |
@if $moz { | |
@include with-only-support-for($moz: true) { | |
@-moz-keyframes #{$name} { @content; } | |
} | |
} | |
@if $webkit { | |
@include with-only-support-for($webkit: true) { | |
@-webkit-keyframes #{$name} { @content; } | |
} | |
} | |
@if $o { | |
@include with-only-support-for($o: true) { | |
@-o-keyframes #{$name} { @content; } | |
} | |
} | |
@if $ms { | |
@include with-only-support-for($ms: true) { | |
@-ms-keyframes #{$name} { @content; } | |
} | |
} | |
@if $khtml { | |
@include with-only-support-for($khtml: true) { | |
@-khtml-keyframes #{$name} { @content; } | |
} | |
} | |
@if $official { | |
@include with-only-support-for { | |
@keyframes #{$name} { @content; } | |
} | |
} | |
} |
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 set-experimental-support($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false) { | |
$experimental-support-for-mozilla: $moz; | |
$experimental-support-for-webkit: $webkit; | |
$experimental-support-for-microsoft: $ms; | |
$experimental-support-for-opera: $o; | |
$experimental-support-for-khtml: $khtml; | |
} | |
@mixin with-only-support-for($moz: false, $webkit: false, $ms: false, $o: false, $khtml: false) { | |
// Capture the current state | |
$original-moz: $experimental-support-for-mozilla; | |
$original-webkit: $experimental-support-for-webkit; | |
$original-o: $experimental-support-for-opera; | |
$original-ms: $experimental-support-for-microsoft; | |
$original-khtml: $experimental-support-for-khtml; | |
@include set-experimental-support($moz, $webkit, $ms, $o, $khtml); | |
@content; | |
@include set-experimental-support($original-moz, $original-webkit, $original-ms, $original-o, $original-khtml); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage: