Cable-Desktop/stylesheets/_hourglass.scss
lilia 7256fe9b6f Reduce CPU load from css animations
On osx this cuts the load in half. We can probably do better with
js-based animations but let this be a quick fix for now.
2016-10-16 16:32:01 +09:00

29 lines
620 B
SCSS

@mixin hourglass($color) {
display: inline-block;
position: relative;
@include color-svg('/images/hourglass_full.svg', transparent);
background-size: 100%;
&, .sand, &:before, &:after {
width: 13px;
height: 11px;
}
.sand, &:before, &:after {
content: '';
display: inline-block;
position: absolute;
top: 0;
left: 0;
}
.sand {
background: $color;
animation: moveDown steps(100);
animation-fill-mode: forwards;
}
&:after {
@include color-svg('/images/hourglass_empty.svg', $color);
}
@keyframes moveDown {
to { transform: translateY(100%); }
}
}