2016-09-22 21:12:38 +00:00
|
|
|
@mixin hourglass($width, $height, $color) {
|
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
|
|
|
vertical-align: text-bottom;
|
|
|
|
@include color-svg('/images/hourglass_full.svg', transparent);
|
|
|
|
background-size: 100%;
|
|
|
|
|
2016-09-23 23:19:29 +00:00
|
|
|
&, .sand, &:before, &:after {
|
2016-09-22 21:12:38 +00:00
|
|
|
width: $width;
|
|
|
|
height: $height;
|
|
|
|
}
|
2016-09-23 23:19:29 +00:00
|
|
|
.sand, &:before, &:after {
|
2016-09-22 21:12:38 +00:00
|
|
|
content: '';
|
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
2016-09-23 23:19:29 +00:00
|
|
|
.sand {
|
2016-09-22 21:12:38 +00:00
|
|
|
background: $color;
|
2016-09-23 23:19:29 +00:00
|
|
|
animation: moveDown linear;
|
2016-09-22 21:12:38 +00:00
|
|
|
animation-fill-mode: forwards;
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
@include color-svg('/images/hourglass_empty.svg', $color);
|
|
|
|
}
|
|
|
|
@keyframes moveDown {
|
|
|
|
to {
|
2016-09-23 23:19:29 +00:00
|
|
|
transform: translateY(100%);
|
2016-09-22 21:12:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|