1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
// Adapter with <3 from http://codepen.io/max-scopp/pen/FArlb
// keyframes
@mixin animate-loader($duration) {
@include animation(material-loader-stretch 2.8s ease $duration infinite)
}
.material-line-loader {
width: 100%;
height: 4px;
position: relative;
overflow: hidden;
& > .loader-section {
position: absolute;
height: 100%;
left: 50%;
&:first-child {
background: $brand-success;
@include animate-loader(0s);
}
&:nth-child(2) {
background: $brand-danger;
@include animate-loader(.4s);
}
&:nth-child(3) {
background: $brand-info;
@include animate-loader(.8s);
}
&:nth-child(4) {
background: $brand-warning;
@include animate-loader(1.2s);
}
}
}
@include keyframes(material-loader-stretch) {
0% {
padding: 0 0 0 0;
left: 50%;
z-index: 4;
}
25% {
z-index: 3;
}
50% {
padding: 0 50% 0 50%;
left: 0;
z-index: 2;
}
100% {
padding: 0 50% 0 50%;
left: 0;
z-index: 1;
}
}
// Move it up over the tab line, it looks cleaner
.tab-loading .material-line-loader {
top: -2px;
}
|