codecombat/app/styles/bootstrap/_progress-bars.scss

81 lines
1.6 KiB
SCSS
Raw Normal View History

2014-01-03 13:32:13 -05:00
//
// Progress bars
// --------------------------------------------------
// Bar animations
// -------------------------
2014-01-03 13:32:13 -05:00
// WebKit
2014-01-03 13:32:13 -05:00
@-webkit-keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Spec and IE10+
2014-01-03 13:32:13 -05:00
@keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Bar itself
// -------------------------
2014-01-03 13:32:13 -05:00
// Outer container
.progress {
overflow: hidden;
height: $line-height-computed;
margin-bottom: $line-height-computed;
background-color: $progress-bg;
border-radius: $border-radius-base;
2014-01-03 13:32:13 -05:00
@include box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
}
// Bar of progress
.progress-bar {
float: left;
2014-01-03 13:32:13 -05:00
width: 0%;
height: 100%;
font-size: $font-size-small;
line-height: $line-height-computed;
color: $progress-bar-color;
2014-01-03 13:32:13 -05:00
text-align: center;
background-color: $progress-bar-bg;
2014-01-03 13:32:13 -05:00
@include box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
@include transition(width .6s ease);
}
// Striped bars
.progress-striped .progress-bar {
@include gradient-striped();
background-size: 40px 40px;
2014-01-03 13:32:13 -05:00
}
// Call animation for the active one
.progress.active .progress-bar {
@include animation(progress-bar-stripes 2s linear infinite);
2014-01-03 13:32:13 -05:00
}
// Variations
// -------------------------
2014-01-03 13:32:13 -05:00
.progress-bar-success {
@include progress-bar-variant($progress-bar-success-bg);
2014-01-03 13:32:13 -05:00
}
.progress-bar-info {
@include progress-bar-variant($progress-bar-info-bg);
2014-01-03 13:32:13 -05:00
}
.progress-bar-warning {
@include progress-bar-variant($progress-bar-warning-bg);
2014-01-03 13:32:13 -05:00
}
.progress-bar-danger {
@include progress-bar-variant($progress-bar-danger-bg);
2014-01-03 13:32:13 -05:00
}