2012-06-29 00:46:45 -04:00
|
|
|
//
|
|
|
|
// Progress bars
|
|
|
|
// --------------------------------------------------
|
2012-01-07 18:52:57 -05:00
|
|
|
|
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
//
|
|
|
|
// Progress animations
|
|
|
|
//
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2011-11-26 13:41:17 -05:00
|
|
|
@keyframes progress-bar-stripes {
|
2014-12-02 17:02:35 -05:00
|
|
|
from { background-position: $line-height-computed 0; }
|
2012-03-15 13:11:17 -04:00
|
|
|
to { background-position: 0 0; }
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
//
|
|
|
|
// Basic progress bar
|
|
|
|
//
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2011-11-26 13:41:17 -05:00
|
|
|
.progress {
|
2014-07-09 04:39:34 -04:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2014-12-02 17:02:35 -05:00
|
|
|
height: $line-height-computed;
|
|
|
|
margin-bottom: $line-height-computed;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress[value] {
|
|
|
|
// IE10 uses `color` to set the bar background-color
|
|
|
|
color: #0074d9;
|
2014-12-11 15:05:29 -05:00
|
|
|
// Remove Firefox and Opera border
|
|
|
|
border: 0;
|
|
|
|
// Reset the default appearance
|
|
|
|
appearance: none;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress[value]::-webkit-progress-bar {
|
|
|
|
background-color: #eee;
|
2014-12-02 17:02:35 -05:00
|
|
|
@include border-radius($border-radius-base);
|
|
|
|
@include box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress[value]::-webkit-progress-value::before {
|
|
|
|
content: attr(value);
|
|
|
|
}
|
|
|
|
.progress[value]::-webkit-progress-value {
|
|
|
|
background-color: #0074d9;
|
2014-12-02 17:02:35 -05:00
|
|
|
border-top-left-radius: $border-radius-base;
|
|
|
|
border-bottom-left-radius: $border-radius-base;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress[value="100"]::-webkit-progress-value {
|
2014-12-02 17:02:35 -05:00
|
|
|
border-top-right-radius: $border-radius-base;
|
|
|
|
border-bottom-right-radius: $border-radius-base;
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
// Firefox styles must be entirely separate or it busts Webkit styles.
|
2014-10-27 01:31:59 -04:00
|
|
|
//
|
|
|
|
// Commented out for now because linter.
|
|
|
|
//
|
2014-12-02 17:02:35 -05:00
|
|
|
// $-moz-document url-prefix() {
|
2014-10-27 01:31:59 -04:00
|
|
|
// .progress[value] {
|
|
|
|
// background-color: #eee;
|
2014-12-02 17:02:35 -05:00
|
|
|
// .border-radius($border-radius-base);
|
2014-10-27 01:31:59 -04:00
|
|
|
// .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
|
|
|
// }
|
|
|
|
// .progress[value]::-moz-progress-bar {
|
|
|
|
// background-color: #0074d9;
|
2014-12-02 17:02:35 -05:00
|
|
|
// border-top-left-radius: $border-radius-base;
|
|
|
|
// border-bottom-left-radius: $border-radius-base;
|
2014-10-27 01:31:59 -04:00
|
|
|
// }
|
|
|
|
// .progress[value="0"]::-moz-progress-bar {
|
2014-12-02 17:02:35 -05:00
|
|
|
// color: $gray-light;
|
2014-10-27 01:31:59 -04:00
|
|
|
// min-width: 2rem;
|
|
|
|
// background-color: transparent;
|
|
|
|
// background-image: none;
|
|
|
|
// }
|
|
|
|
// .progress[value="100"]::-moz-progress-bar {
|
2014-12-02 17:02:35 -05:00
|
|
|
// border-top-right-radius: $border-radius-base;
|
|
|
|
// border-bottom-right-radius: $border-radius-base;
|
2014-10-27 01:31:59 -04:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
// IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
|
2014-12-02 17:02:35 -05:00
|
|
|
@media screen and ("min-width:0\0") {
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress {
|
|
|
|
background-color: #eee;
|
2014-12-02 17:02:35 -05:00
|
|
|
@include border-radius($border-radius-base);
|
|
|
|
@include box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress-bar {
|
|
|
|
display: inline-block;
|
2014-12-02 17:02:35 -05:00
|
|
|
height: $line-height-computed;
|
2014-07-09 04:39:34 -04:00
|
|
|
text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
|
|
|
|
background-color: #0074d9;
|
2014-12-02 17:02:35 -05:00
|
|
|
border-top-left-radius: $border-radius-base;
|
|
|
|
border-bottom-left-radius: $border-radius-base;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress[width^="0"] {
|
|
|
|
min-width: 2rem;
|
2014-12-11 15:05:29 -05:00
|
|
|
color: $gray-light;
|
2014-07-09 04:39:34 -04:00
|
|
|
background-color: transparent;
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
.progress[width="100%"] {
|
2014-12-02 17:02:35 -05:00
|
|
|
border-top-right-radius: $border-radius-base;
|
|
|
|
border-bottom-right-radius: $border-radius-base;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-06-19 01:35:05 -04:00
|
|
|
//
|
2014-07-09 04:39:34 -04:00
|
|
|
// Striped
|
|
|
|
//
|
|
|
|
|
|
|
|
.progress-striped[value]::-webkit-progress-value {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include gradient-striped();
|
|
|
|
background-size: $line-height-computed $line-height-computed;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
|
|
|
.progress-striped[value]::-moz-progress-bar {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include gradient-striped();
|
|
|
|
background-size: $line-height-computed $line-height-computed;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
2014-12-02 17:02:35 -05:00
|
|
|
@media screen and ("min-width:0\0") {
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-bar-striped {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include gradient-striped();
|
|
|
|
background-size: $line-height-computed $line-height-computed;
|
2014-07-09 04:39:34 -04:00
|
|
|
}
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// Animated
|
2014-06-19 01:35:05 -04:00
|
|
|
//
|
2014-07-09 04:39:34 -04:00
|
|
|
|
|
|
|
.progress-animated[value]::-webkit-progress-value {
|
2014-07-08 05:04:48 -04:00
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-animated[value]::-moz-progress-bar {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
|
|
|
}
|
2014-12-02 17:02:35 -05:00
|
|
|
@media screen and ("min-width:0\0") {
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-animated .progress-bar-striped {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2014-03-04 19:55:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
//
|
2013-02-01 19:21:38 -05:00
|
|
|
// Variations
|
2014-07-09 04:39:34 -04:00
|
|
|
//
|
2012-01-07 18:52:57 -05:00
|
|
|
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-success {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include progress-variant($progress-bar-success-bg);
|
2012-01-07 18:52:57 -05:00
|
|
|
}
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-info {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include progress-variant($progress-bar-info-bg);
|
2013-08-15 14:56:07 -04:00
|
|
|
}
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-warning {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include progress-variant($progress-bar-warning-bg);
|
2012-02-24 05:23:04 -05:00
|
|
|
}
|
2014-07-09 04:39:34 -04:00
|
|
|
.progress-danger {
|
2014-12-02 17:02:35 -05:00
|
|
|
@include progress-variant($progress-bar-danger-bg);
|
2012-02-24 05:23:04 -05:00
|
|
|
}
|