1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/less/progress-bars.less

125 lines
2.9 KiB
Text
Raw Normal View History

2012-06-29 00:46:45 -04:00
//
// Progress bars
// --------------------------------------------------
// ANIMATIONS
// ----------
// Webkit
2011-11-26 13:41:17 -05:00
@-webkit-keyframes progress-bar-stripes {
2012-03-15 13:11:17 -04:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
2011-11-26 13:41:17 -05:00
}
// Firefox
@-moz-keyframes progress-bar-stripes {
2012-03-15 13:11:17 -04:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
2011-11-26 13:41:17 -05:00
// IE9
@-ms-keyframes progress-bar-stripes {
2012-03-15 13:11:17 -04: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 13:41:17 -05:00
@keyframes progress-bar-stripes {
2012-03-15 13:11:17 -04:00
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// THE BARS
// --------
// Outer container
2011-11-26 13:41:17 -05:00
.progress {
overflow: hidden;
height: @line-height-base;
margin-bottom: @line-height-base;
2013-01-16 18:19:55 -05:00
background-color: #f5f5f5;
border-radius: @border-radius-base;
2013-01-16 18:19:55 -05:00
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
}
// Bar of progress
.progress .bar {
2013-01-16 18:19:55 -05:00
float: left;
width: 0%;
2012-07-02 17:21:26 -04:00
height: 100%;
2012-01-24 23:30:26 -05:00
font-size: 12px;
2013-01-16 18:19:55 -05:00
color: #fff;
2012-01-24 23:30:26 -05:00
text-align: center;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
2013-01-16 18:19:55 -05:00
background-color: #149bdf;
/*#gradient > .vertical(#149bdf, #0480be);*/
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.box-sizing(border-box);
.transition(width .6s ease);
}
// Striped bars
.progress-striped .bar {
#gradient > .striped(#149bdf);
.background-size(40px 40px);
}
// Call animation for the active one
.progress.active .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;
}
// COLORS
// ------
// Danger (red)
2012-08-20 04:12:03 -04:00
.progress-danger .bar, .progress .bar-danger {
2013-01-16 18:19:55 -05:00
background-color: #ee5f5b;
/*#gradient > .vertical(#ee5f5b, #c43c35);*/
}
2012-08-20 04:12:03 -04:00
.progress-danger.progress-striped .bar, .progress-striped .bar-danger {
#gradient > .striped(#ee5f5b);
}
// Success (green)
2012-08-20 04:12:03 -04:00
.progress-success .bar, .progress .bar-success {
2013-01-16 18:19:55 -05:00
background-color: #62c462;
/*#gradient > .vertical(#62c462, #57a957);*/
}
2012-08-20 04:12:03 -04:00
.progress-success.progress-striped .bar, .progress-striped .bar-success {
#gradient > .striped(#62c462);
}
// Info (teal)
2012-08-20 04:12:03 -04:00
.progress-info .bar, .progress .bar-info {
2013-01-16 18:19:55 -05:00
background-color: #5bc0de;
/*#gradient > .vertical(#5bc0de, #339bb9);*/
}
2012-08-20 04:12:03 -04:00
.progress-info.progress-striped .bar, .progress-striped .bar-info {
#gradient > .striped(#5bc0de);
}
// Warning (orange)
2012-08-20 04:12:03 -04:00
.progress-warning .bar, .progress .bar-warning {
2013-01-16 18:19:55 -05:00
background-color: lighten(#f89406, 15%);
/*#gradient > .vertical(lighten(#f89406, 15%), #f89406);*/
}
2012-08-20 04:12:03 -04:00
.progress-warning.progress-striped .bar, .progress-striped .bar-warning {
#gradient > .striped(lighten(#f89406, 15%));
}