2014-07-09 01:39:34 -07:00
|
|
|
//
|
|
|
|
// Progress animations
|
|
|
|
//
|
2012-01-07 15:52:57 -08:00
|
|
|
|
2011-11-26 19:41:17 +01:00
|
|
|
@keyframes progress-bar-stripes {
|
2016-02-06 12:28:18 -08:00
|
|
|
from { background-position: $spacer-y 0; }
|
|
|
|
to { background-position: 0 0; }
|
2012-01-07 15:52:57 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-09 01:39:34 -07:00
|
|
|
//
|
|
|
|
// Basic progress bar
|
|
|
|
//
|
2012-01-07 15:52:57 -08:00
|
|
|
|
2011-11-26 19:41:17 +01:00
|
|
|
.progress {
|
2014-07-09 01:39:34 -07:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2015-04-29 12:00:11 -07:00
|
|
|
height: $spacer-y; // todo: make a new var for this
|
|
|
|
margin-bottom: $spacer-y;
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
|
|
|
.progress[value] {
|
2015-12-10 22:29:54 +00:00
|
|
|
// Set overall background
|
2015-12-21 10:52:03 -07:00
|
|
|
background-color: $progress-bg;
|
2014-12-11 12:05:29 -08:00
|
|
|
// Remove Firefox and Opera border
|
|
|
|
border: 0;
|
|
|
|
// Reset the default appearance
|
|
|
|
appearance: none;
|
2015-12-10 22:29:54 +00:00
|
|
|
// Set overall border radius
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-radius($progress-border-radius);
|
2015-12-10 22:29:54 +00:00
|
|
|
}
|
2015-12-23 22:35:45 -07:00
|
|
|
|
|
|
|
// Filled-in portion of the bar
|
2015-12-10 22:29:54 +00:00
|
|
|
.progress[value]::-ms-fill {
|
2015-12-21 10:46:33 -07:00
|
|
|
background-color: $progress-bar-color;
|
2015-12-10 22:29:54 +00:00
|
|
|
// Remove right-hand border of value bar from IE10+/Edge
|
|
|
|
border: 0;
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
2015-12-23 22:45:04 -07:00
|
|
|
.progress[value]::-moz-progress-bar {
|
|
|
|
background-color: $progress-bar-color;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-left-radius($progress-border-radius);
|
2015-12-23 22:45:04 -07:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress[value]::-webkit-progress-value {
|
2015-12-21 10:46:33 -07:00
|
|
|
background-color: $progress-bar-color;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-left-radius($progress-border-radius);
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
2015-12-23 22:45:04 -07:00
|
|
|
// Tweaks for full progress bar
|
|
|
|
.progress[value="100"]::-moz-progress-bar {
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-right-radius($progress-border-radius);
|
2015-12-23 22:45:04 -07:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress[value="100"]::-webkit-progress-value {
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-right-radius($progress-border-radius);
|
2012-01-07 15:52:57 -08:00
|
|
|
}
|
|
|
|
|
2015-12-23 22:35:45 -07:00
|
|
|
// Unfilled portion of the bar
|
|
|
|
.progress[value]::-webkit-progress-bar {
|
|
|
|
background-color: $progress-bg;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-radius($progress-border-radius);
|
2016-01-09 14:59:08 -08:00
|
|
|
@include box-shadow($progress-box-shadow);
|
2015-12-23 22:35:45 -07:00
|
|
|
}
|
2015-12-23 22:45:04 -07:00
|
|
|
base::-moz-progress-bar, // Absurd-but-syntactically-valid selector to make these styles Firefox-only
|
|
|
|
.progress[value] {
|
|
|
|
background-color: $progress-bg;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-radius($progress-border-radius);
|
2016-01-09 14:59:08 -08:00
|
|
|
@include box-shadow($progress-box-shadow);
|
2015-12-23 22:45:04 -07:00
|
|
|
}
|
2014-10-26 22:31:59 -07:00
|
|
|
|
2014-07-09 01:39:34 -07:00
|
|
|
// IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
|
2015-05-15 12:17:09 -07:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress {
|
2015-12-21 10:52:03 -07:00
|
|
|
background-color: $progress-bg;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-radius($progress-border-radius);
|
2016-01-09 14:59:08 -08:00
|
|
|
@include box-shadow($progress-box-shadow);
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
|
|
|
.progress-bar {
|
|
|
|
display: inline-block;
|
2015-04-29 12:00:11 -07:00
|
|
|
height: $spacer-y;
|
2014-07-09 01:39:34 -07:00
|
|
|
text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
|
2015-12-21 10:46:33 -07:00
|
|
|
background-color: $progress-bar-color;
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-left-radius($progress-border-radius);
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
|
|
|
.progress[width="100%"] {
|
2016-07-20 01:01:25 +00:00
|
|
|
@include border-right-radius($progress-border-radius);
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-06-18 22:35:05 -07:00
|
|
|
//
|
2014-07-09 01:39:34 -07:00
|
|
|
// Striped
|
|
|
|
//
|
|
|
|
|
|
|
|
.progress-striped[value]::-webkit-progress-value {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include gradient-striped();
|
2015-04-29 12:00:11 -07:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
|
|
|
.progress-striped[value]::-moz-progress-bar {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include gradient-striped();
|
2015-04-29 12:00:11 -07:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
2015-12-10 22:29:54 +00:00
|
|
|
.progress-striped[value]::-ms-fill {
|
|
|
|
@include gradient-striped();
|
|
|
|
background-size: $spacer-y $spacer-y;
|
|
|
|
}
|
2015-10-31 14:37:13 -07:00
|
|
|
// IE9
|
2015-05-15 12:17:09 -07:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-bar-striped {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include gradient-striped();
|
2015-04-29 12:00:11 -07:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 01:39:34 -07:00
|
|
|
}
|
2012-01-07 15:52:57 -08:00
|
|
|
}
|
|
|
|
|
2014-07-09 01:39:34 -07:00
|
|
|
|
|
|
|
//
|
|
|
|
// Animated
|
2014-06-18 22:35:05 -07:00
|
|
|
//
|
2014-07-09 01:39:34 -07:00
|
|
|
|
|
|
|
.progress-animated[value]::-webkit-progress-value {
|
2014-07-08 02:04:48 -07:00
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2012-01-07 15:52:57 -08:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-animated[value]::-moz-progress-bar {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
|
|
|
}
|
2015-10-31 14:37:13 -07:00
|
|
|
// IE9
|
2015-05-15 12:17:09 -07:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-animated .progress-bar-striped {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2014-03-04 16:55:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-01-07 15:52:57 -08:00
|
|
|
|
2014-07-09 01:39:34 -07:00
|
|
|
//
|
2013-02-01 16:21:38 -08:00
|
|
|
// Variations
|
2014-07-09 01:39:34 -07:00
|
|
|
//
|
2012-01-07 15:52:57 -08:00
|
|
|
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-success {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include progress-variant($progress-bar-success-bg);
|
2012-01-07 15:52:57 -08:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-info {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include progress-variant($progress-bar-info-bg);
|
2013-08-15 11:56:07 -07:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-warning {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include progress-variant($progress-bar-warning-bg);
|
2012-02-24 11:23:04 +01:00
|
|
|
}
|
2014-07-09 01:39:34 -07:00
|
|
|
.progress-danger {
|
2014-12-02 14:02:35 -08:00
|
|
|
@include progress-variant($progress-bar-danger-bg);
|
2012-02-24 11:23:04 +01:00
|
|
|
}
|