mirror of
https://github.com/danog/sass-site.git
synced 2024-12-13 18:07:35 +01:00
52 lines
1.2 KiB
SCSS
52 lines
1.2 KiB
SCSS
|
$progress-block-count: 8;
|
||
|
$progress-block-size: $font-unit;
|
||
|
|
||
|
// without the 's' for seconds...
|
||
|
$progress-block-animation-duration: 1;
|
||
|
|
||
|
$progress-block-delay-interval: 1 / $progress-block-count;
|
||
|
|
||
|
|
||
|
|
||
|
.progress {
|
||
|
@include stretch;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
|
||
|
.progress-wrap { @extend %table-layout; }
|
||
|
|
||
|
.progress-center {
|
||
|
@extend %table-layout-cell;
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
.progress-bar {
|
||
|
position: relative;
|
||
|
display: inline-block;
|
||
|
width: $progress-block-count * $progress-block-size;
|
||
|
height: $progress-block-size;
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
|
||
|
.progress-block {
|
||
|
@include animation-name(progress-block);
|
||
|
@include animation-duration(#{$progress-block-animation-duration}s);
|
||
|
@include animation-iteration-count;
|
||
|
@include animation-direction;
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
width: $progress-block-size;
|
||
|
height: $progress-block-size;
|
||
|
background: $color-primary;
|
||
|
}
|
||
|
|
||
|
@for $i from 1 through $progress-block-count {
|
||
|
.progress-block:nth-child(#{$i}) {
|
||
|
@include animation-delay(#{$progress-block-delay-interval * ($i - 1) * $progress-block-animation-duration}s);
|
||
|
left: $progress-block-size * ($i - 1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@include keyframes(progress-block, background-color, $color-primary, transparent);
|