twbs--bootstrap/less/progress-bars.less

90 lines
1.7 KiB
Plaintext
Raw Normal View History

2012-06-29 04:46:45 +00:00
//
// Progress bars
// --------------------------------------------------
// Bar animations
// -------------------------
2011-11-26 18:41:17 +00:00
@keyframes progress-bar-stripes {
2012-03-15 17:11:17 +00:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Bar itself
// -------------------------
// Outer container
2011-11-26 18:41:17 +00:00
.progress {
overflow: hidden;
height: @line-height-computed;
margin-bottom: @line-height-computed;
background-color: @progress-bg;
border-radius: @border-radius-base;
2013-01-16 23:19:55 +00:00
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
}
// Bar of progress
.progress-bar {
2013-01-16 23:19:55 +00:00
float: left;
width: 0%;
2012-07-02 21:21:26 +00:00
height: 100%;
font-size: @font-size-small;
line-height: @line-height-computed;
color: @progress-bar-color;
2012-01-25 04:30:26 +00:00
text-align: center;
background-color: @progress-bar-bg;
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.transition(width .6s ease);
}
// Striped bars
.progress-striped .progress-bar {
#gradient > .striped();
background-size: 40px 40px;
}
// Call animation for the active one
.progress.active .progress-bar {
2013-10-26 12:11:59 +00:00
.animation(progress-bar-stripes 2s linear infinite);
}
// 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;
}
}
// Variations
// -------------------------
.progress-bar-success {
2013-07-07 22:06:16 +00:00
.progress-bar-variant(@progress-bar-success-bg);
}
2013-08-15 18:56:07 +00:00
.progress-bar-info {
.progress-bar-variant(@progress-bar-info-bg);
}
.progress-bar-warning {
2013-07-07 22:06:16 +00:00
.progress-bar-variant(@progress-bar-warning-bg);
}
2013-08-15 18:56:07 +00:00
.progress-bar-danger {
.progress-bar-variant(@progress-bar-danger-bg);
}