0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Bootstrap/less/progress-bars.less

119 lines
2.5 KiB
Plaintext
Raw Normal View History

2012-06-29 06:46:45 +02:00
//
// Progress bars
// --------------------------------------------------
// Bar animations
// -------------------------
// Webkit
2011-11-26 19:41:17 +01:00
@-webkit-keyframes progress-bar-stripes {
2012-03-15 18:11:17 +01:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
2011-11-26 19:41:17 +01:00
}
// Firefox
@-moz-keyframes progress-bar-stripes {
2012-03-15 18:11:17 +01:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
2011-11-26 19:41:17 +01:00
// IE9
@-ms-keyframes progress-bar-stripes {
2012-03-15 18:11:17 +01:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Opera
@-o-keyframes progress-bar-stripes {
from { background-position: 0 0; }
to { background-position: 40px 0; }
}
// Spec
2011-11-26 19:41:17 +01:00
@keyframes progress-bar-stripes {
2012-03-15 18:11:17 +01:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Bar itself
// -------------------------
// Outer container
2011-11-26 19:41:17 +01:00
.progress {
overflow: hidden;
height: @line-height-base;
margin-bottom: @line-height-base;
background-color: @progress-bg;
border-radius: @border-radius-base;
2013-01-17 00:19:55 +01:00
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
}
// Bar of progress
.progress-bar {
2013-01-17 00:19:55 +01:00
float: left;
width: 0%;
2012-07-02 23:21:26 +02:00
height: 100%;
2012-01-25 05:30:26 +01:00
font-size: 12px;
2013-01-17 00:19:55 +01:00
color: #fff;
2012-01-25 05:30:26 +01:00
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
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(@progress-bar-bg);
.background-size(40px 40px);
}
// Call animation for the active one
.progress.active .progress-bar {
-webkit-animation: progress-bar-stripes 2s linear infinite;
-moz-animation: progress-bar-stripes 2s linear infinite;
-ms-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
// Variations
// -------------------------
// Danger (red)
.progress-bar-danger {
background-color: @progress-bar-danger-bg;
.progress-striped & {
#gradient > .striped(@progress-bar-danger-bg);
}
}
// Success (green)
.progress-bar-success {
background-color: @progress-bar-success-bg;
.progress-striped & {
#gradient > .striped(@progress-bar-success-bg);
}
}
// Warning (orange)
.progress-bar-warning {
background-color: @progress-bar-warning-bg;
.progress-striped & {
#gradient > .striped(@progress-bar-warning-bg);
}
}
// Info (teal)
.progress-bar-info {
background-color: @progress-bar-info-bg;
.progress-striped & {
#gradient > .striped(@progress-bar-info-bg);
}
}