2014-07-09 16:39:34 +08:00
|
|
|
//
|
|
|
|
// Progress animations
|
|
|
|
//
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2011-11-27 02:41:17 +08:00
|
|
|
@keyframes progress-bar-stripes {
|
2015-04-30 03:00:11 +08:00
|
|
|
from { background-position: $spacer-y 0; }
|
2012-03-16 01:11:17 +08:00
|
|
|
to { background-position: 0 0; }
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-07-09 16:39:34 +08:00
|
|
|
//
|
|
|
|
// Basic progress bar
|
|
|
|
//
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2011-11-27 02:41:17 +08:00
|
|
|
.progress {
|
2014-07-09 16:39:34 +08:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2015-04-30 03:00:11 +08:00
|
|
|
height: $spacer-y; // todo: make a new var for this
|
|
|
|
margin-bottom: $spacer-y;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress[value] {
|
2015-12-11 06:29:54 +08:00
|
|
|
// Set overall background
|
2015-12-22 01:52:03 +08:00
|
|
|
background-color: $progress-bg;
|
2014-12-12 04:05:29 +08:00
|
|
|
// Remove Firefox and Opera border
|
|
|
|
border: 0;
|
|
|
|
// Reset the default appearance
|
|
|
|
appearance: none;
|
2015-12-11 06:29:54 +08:00
|
|
|
// Set overall border radius
|
|
|
|
@include border-radius($border-radius);
|
|
|
|
}
|
|
|
|
.progress[value]::-ms-fill {
|
2015-12-22 01:46:33 +08:00
|
|
|
background-color: $progress-bar-color;
|
2015-12-11 06:29:54 +08:00
|
|
|
// Remove right-hand border of value bar from IE10+/Edge
|
|
|
|
border: 0;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress[value]::-webkit-progress-bar {
|
2015-12-22 01:52:03 +08:00
|
|
|
background-color: $progress-bg;
|
2015-06-23 09:53:04 +08:00
|
|
|
@include border-radius($border-radius);
|
2014-12-03 06:02:35 +08:00
|
|
|
@include box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress[value]::-webkit-progress-value {
|
2015-12-22 01:46:33 +08:00
|
|
|
background-color: $progress-bar-color;
|
2015-06-23 09:53:04 +08:00
|
|
|
border-top-left-radius: $border-radius;
|
|
|
|
border-bottom-left-radius: $border-radius;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress[value="100"]::-webkit-progress-value {
|
2015-06-23 09:53:04 +08:00
|
|
|
border-top-right-radius: $border-radius;
|
|
|
|
border-bottom-right-radius: $border-radius;
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
2014-07-09 16:39:34 +08:00
|
|
|
// Firefox styles must be entirely separate or it busts Webkit styles.
|
2014-10-27 13:31:59 +08:00
|
|
|
//
|
|
|
|
// Commented out for now because linter.
|
|
|
|
//
|
2014-12-03 06:02:35 +08:00
|
|
|
// $-moz-document url-prefix() {
|
2014-10-27 13:31:59 +08:00
|
|
|
// .progress[value] {
|
2015-12-22 01:52:03 +08:00
|
|
|
// background-color: $progress-bg;
|
2015-06-23 09:53:04 +08:00
|
|
|
// .border-radius($border-radius);
|
2014-10-27 13:31:59 +08:00
|
|
|
// .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
|
|
|
// }
|
|
|
|
// .progress[value]::-moz-progress-bar {
|
2015-12-22 01:46:33 +08:00
|
|
|
// background-color: $progress-bar-color;
|
2015-06-23 09:53:04 +08:00
|
|
|
// border-top-left-radius: $border-radius;
|
|
|
|
// border-bottom-left-radius: $border-radius;
|
2014-10-27 13:31:59 +08:00
|
|
|
// }
|
|
|
|
// .progress[value="0"]::-moz-progress-bar {
|
2014-12-03 06:02:35 +08:00
|
|
|
// color: $gray-light;
|
2014-10-27 13:31:59 +08:00
|
|
|
// min-width: 2rem;
|
|
|
|
// background-color: transparent;
|
|
|
|
// background-image: none;
|
|
|
|
// }
|
|
|
|
// .progress[value="100"]::-moz-progress-bar {
|
2015-06-23 09:53:04 +08:00
|
|
|
// border-top-right-radius: $border-radius;
|
|
|
|
// border-bottom-right-radius: $border-radius;
|
2014-10-27 13:31:59 +08:00
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
2014-07-09 16:39:34 +08: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-16 03:17:09 +08:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress {
|
2015-12-22 01:52:03 +08:00
|
|
|
background-color: $progress-bg;
|
2015-06-23 09:53:04 +08:00
|
|
|
@include border-radius($border-radius);
|
2014-12-03 06:02:35 +08:00
|
|
|
@include box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress-bar {
|
|
|
|
display: inline-block;
|
2015-04-30 03:00:11 +08:00
|
|
|
height: $spacer-y;
|
2014-07-09 16:39:34 +08:00
|
|
|
text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
|
2015-12-22 01:46:33 +08:00
|
|
|
background-color: $progress-bar-color;
|
2015-06-23 09:53:04 +08:00
|
|
|
border-top-left-radius: $border-radius;
|
|
|
|
border-bottom-left-radius: $border-radius;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress[width^="0"] {
|
|
|
|
min-width: 2rem;
|
2014-12-12 04:05:29 +08:00
|
|
|
color: $gray-light;
|
2014-07-09 16:39:34 +08:00
|
|
|
background-color: transparent;
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
.progress[width="100%"] {
|
2015-06-23 09:53:04 +08:00
|
|
|
border-top-right-radius: $border-radius;
|
|
|
|
border-bottom-right-radius: $border-radius;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-06-19 13:35:05 +08:00
|
|
|
//
|
2014-07-09 16:39:34 +08:00
|
|
|
// Striped
|
|
|
|
//
|
|
|
|
|
|
|
|
.progress-striped[value]::-webkit-progress-value {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include gradient-striped();
|
2015-04-30 03:00:11 +08:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
|
|
|
.progress-striped[value]::-moz-progress-bar {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include gradient-striped();
|
2015-04-30 03:00:11 +08:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
2015-12-11 06:29:54 +08:00
|
|
|
.progress-striped[value]::-ms-fill {
|
|
|
|
@include gradient-striped();
|
|
|
|
background-size: $spacer-y $spacer-y;
|
|
|
|
}
|
2015-11-01 05:37:13 +08:00
|
|
|
// IE9
|
2015-05-16 03:17:09 +08:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-bar-striped {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include gradient-striped();
|
2015-04-30 03:00:11 +08:00
|
|
|
background-size: $spacer-y $spacer-y;
|
2014-07-09 16:39:34 +08:00
|
|
|
}
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
2014-07-09 16:39:34 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Animated
|
2014-06-19 13:35:05 +08:00
|
|
|
//
|
2014-07-09 16:39:34 +08:00
|
|
|
|
|
|
|
.progress-animated[value]::-webkit-progress-value {
|
2014-07-08 17:04:48 +08:00
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-animated[value]::-moz-progress-bar {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
|
|
|
}
|
2015-11-01 05:37:13 +08:00
|
|
|
// IE9
|
2015-05-16 03:17:09 +08:00
|
|
|
@media screen and (min-width:0\0) {
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-animated .progress-bar-striped {
|
|
|
|
animation: progress-bar-stripes 2s linear infinite;
|
2014-03-05 08:55:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2014-07-09 16:39:34 +08:00
|
|
|
//
|
2013-02-02 08:21:38 +08:00
|
|
|
// Variations
|
2014-07-09 16:39:34 +08:00
|
|
|
//
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-success {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include progress-variant($progress-bar-success-bg);
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-info {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include progress-variant($progress-bar-info-bg);
|
2013-08-16 02:56:07 +08:00
|
|
|
}
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-warning {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include progress-variant($progress-bar-warning-bg);
|
2012-02-24 18:23:04 +08:00
|
|
|
}
|
2014-07-09 16:39:34 +08:00
|
|
|
.progress-danger {
|
2014-12-03 06:02:35 +08:00
|
|
|
@include progress-variant($progress-bar-danger-bg);
|
2012-02-24 18:23:04 +08:00
|
|
|
}
|