Created
May 7, 2014 14:42
-
-
Save nsams/44e0388883239e9008dc 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 "kwf/modernizr" | |
@mixin loading-animation-big($animationName, $path, $file, $width, $height, $params:"") { | |
@include modernizr(cssanimations) { | |
background: url($path + '/' + $file + '.png') $params; | |
position: absolute; | |
height: $height; | |
width: $width; | |
margin: 0 auto; | |
display: block; | |
content: ''; | |
left: 50%; | |
top: 50%; | |
margin-left: -($width / 2); | |
margin-top: -($height / 2); | |
-moz-animation: $animationName .5s infinite linear; | |
-webkit-animation: $animationName .5s infinite linear; | |
animation: $animationName .5s infinite linear; | |
@media (min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.1) { | |
& { | |
background-image: url($path + '/dpr2/' + $file + '.png'); | |
background-size: $width $height; | |
-webkit-background-size: $width $height; | |
} | |
} | |
} | |
@include modernizr-no(cssanimations) { | |
background: url($path + '/' + $file + '.gif') $params; | |
position: absolute; | |
height: $height; | |
width: $width; | |
margin: 0 auto; | |
display: block; | |
content: ''; | |
left: 50%; | |
top: 50%; | |
margin-left: -($width / 2); | |
margin-top: -($height / 2); | |
} | |
} |
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
@import "kwf/loading-animation.scss"; | |
@mixin default-loading-animation-big() { | |
@include loading-animation-big(kwfLoadingSpin, /assets/kwf/images/loading, loadingbig, 50px, 50px, no-repeat scroll center center transparent); | |
} |
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
// Modernizr mixin to create html.modernizr selector | |
@mixin modernizr($test) { | |
html.#{$test} & { | |
@content; | |
} | |
} | |
@mixin modernizr-no($test, $no: true) { | |
html.no-#{$test} & { | |
@content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment