2012-06-29 12:46:45 +08:00
|
|
|
//
|
|
|
|
// Progress bars
|
|
|
|
// --------------------------------------------------
|
2012-01-08 07:52:57 +08:00
|
|
|
|
|
|
|
|
2013-02-02 08:21:38 +08:00
|
|
|
// Bar animations
|
|
|
|
// -------------------------
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2011-11-27 02:41:17 +08:00
|
|
|
@keyframes progress-bar-stripes {
|
2012-03-16 01:11:17 +08:00
|
|
|
from { background-position: 40px 0; }
|
|
|
|
to { background-position: 0 0; }
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-02 08:21:38 +08:00
|
|
|
// Bar itself
|
|
|
|
// -------------------------
|
2012-01-08 07:52:57 +08:00
|
|
|
|
|
|
|
// Outer container
|
2011-11-27 02:41:17 +08:00
|
|
|
.progress {
|
2012-01-28 12:17:03 +08:00
|
|
|
overflow: hidden;
|
2013-05-10 08:20:46 +08:00
|
|
|
height: @line-height-computed;
|
|
|
|
margin-bottom: @line-height-computed;
|
2013-02-02 08:21:38 +08:00
|
|
|
background-color: @progress-bg;
|
2012-12-01 06:45:25 +08:00
|
|
|
border-radius: @border-radius-base;
|
2013-01-17 07:19:55 +08:00
|
|
|
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Bar of progress
|
2013-02-02 08:21:38 +08:00
|
|
|
.progress-bar {
|
2013-01-17 07:19:55 +08:00
|
|
|
float: left;
|
2012-01-08 07:52:57 +08:00
|
|
|
width: 0%;
|
2012-07-03 05:21:26 +08:00
|
|
|
height: 100%;
|
2013-04-24 06:41:06 +08:00
|
|
|
font-size: @font-size-small;
|
2013-09-04 11:11:27 +08:00
|
|
|
line-height: @line-height-computed;
|
2013-07-26 20:04:15 +08:00
|
|
|
color: @progress-bar-color;
|
2012-01-25 12:30:26 +08:00
|
|
|
text-align: center;
|
2013-02-02 08:21:38 +08:00
|
|
|
background-color: @progress-bar-bg;
|
2012-01-08 07:52:57 +08:00
|
|
|
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
|
|
|
|
.transition(width .6s ease);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Striped bars
|
2014-06-19 13:35:05 +08:00
|
|
|
//
|
2014-06-19 17:09:35 +08:00
|
|
|
// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
|
2014-06-19 13:35:05 +08:00
|
|
|
// `.progress-bar-striped` class, which you just add to an existing
|
|
|
|
// `.progress-bar`.
|
2014-06-19 12:58:29 +08:00
|
|
|
.progress-striped .progress-bar,
|
|
|
|
.progress-bar-striped {
|
2013-08-21 11:46:01 +08:00
|
|
|
#gradient > .striped();
|
2013-08-13 01:01:13 +08:00
|
|
|
background-size: 40px 40px;
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Call animation for the active one
|
2014-06-19 13:35:05 +08:00
|
|
|
//
|
2014-06-19 17:09:35 +08:00
|
|
|
// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
|
2014-06-19 13:35:05 +08:00
|
|
|
// `.progress-bar.active` approach.
|
|
|
|
.progress.active .progress-bar,
|
|
|
|
.progress-bar.active {
|
2013-10-26 20:11:59 +08:00
|
|
|
.animation(progress-bar-stripes 2s linear infinite);
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
|
|
|
|
2014-03-05 08:55:15 +08:00
|
|
|
// Account for lower percentages
|
|
|
|
.progress-bar {
|
|
|
|
&[aria-valuenow="1"],
|
|
|
|
&[aria-valuenow="2"] {
|
|
|
|
min-width: 30px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[aria-valuenow="0"] {
|
|
|
|
color: @gray-light;
|
|
|
|
min-width: 30px;
|
|
|
|
background-color: transparent;
|
|
|
|
background-image: none;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-01-08 07:52:57 +08:00
|
|
|
|
|
|
|
|
2013-02-02 08:21:38 +08:00
|
|
|
// Variations
|
|
|
|
// -------------------------
|
2012-01-08 07:52:57 +08:00
|
|
|
|
2013-02-02 08:21:38 +08:00
|
|
|
.progress-bar-success {
|
2013-07-08 06:06:16 +08:00
|
|
|
.progress-bar-variant(@progress-bar-success-bg);
|
2012-01-08 07:52:57 +08:00
|
|
|
}
|
2012-02-24 18:23:04 +08:00
|
|
|
|
2013-08-16 02:56:07 +08:00
|
|
|
.progress-bar-info {
|
|
|
|
.progress-bar-variant(@progress-bar-info-bg);
|
|
|
|
}
|
|
|
|
|
2013-02-02 08:21:38 +08:00
|
|
|
.progress-bar-warning {
|
2013-07-08 06:06:16 +08:00
|
|
|
.progress-bar-variant(@progress-bar-warning-bg);
|
2012-02-24 18:23:04 +08:00
|
|
|
}
|
2013-02-02 08:21:38 +08:00
|
|
|
|
2013-08-16 02:56:07 +08:00
|
|
|
.progress-bar-danger {
|
|
|
|
.progress-bar-variant(@progress-bar-danger-bg);
|
2012-02-24 18:23:04 +08:00
|
|
|
}
|