Update _mixins.sass
This commit is contained in:
parent
21932d9be3
commit
b2817bb569
19
_mixins.sass
19
_mixins.sass
@ -153,3 +153,22 @@
|
|||||||
margin-left: 0
|
margin-left: 0
|
||||||
&:last-child
|
&:last-child
|
||||||
margin-right: 0
|
margin-right: 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create animation from a horizontal sprite sheet
|
||||||
|
*
|
||||||
|
* Examples: @include animationSpriteSheet(6, "../img/sprite.png", 1.5s)
|
||||||
|
*/
|
||||||
|
@mixin animationSpriteSheet($steps, $image, $speed: 1s, $iteration: infinite)
|
||||||
|
$id: unique-id()
|
||||||
|
@keyframes #{$id}
|
||||||
|
100%
|
||||||
|
background-position-x: calc(#{$steps} * -100%)
|
||||||
|
animation:
|
||||||
|
name: $id
|
||||||
|
duration: $speed
|
||||||
|
iteration-count: $iteration
|
||||||
|
timing-function: steps(#{$steps})
|
||||||
|
background:
|
||||||
|
image: url(#{$image})
|
||||||
|
size: calc(#{$steps} * 100%) auto
|
||||||
|
Loading…
Reference in New Issue
Block a user