Commit 54537b50 authored by Mark Otto's avatar Mark Otto

Refactor: drop all custom .progress-bar styles and replace with <progress> element

parent 79f56dbe
...@@ -4062,7 +4062,7 @@ a.list-group-item.active > .badge, ...@@ -4062,7 +4062,7 @@ a.list-group-item.active > .badge,
} }
@-webkit-keyframes progress-bar-stripes { @-webkit-keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
...@@ -4070,7 +4070,7 @@ a.list-group-item.active > .badge, ...@@ -4070,7 +4070,7 @@ a.list-group-item.active > .badge,
} }
@-o-keyframes progress-bar-stripes { @-o-keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
...@@ -4078,89 +4078,175 @@ a.list-group-item.active > .badge, ...@@ -4078,89 +4078,175 @@ a.list-group-item.active > .badge,
} }
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
} }
} }
.progress { .progress {
display: block;
width: 100%;
height: 24px; height: 24px;
margin-bottom: 24px; margin-bottom: 24px;
overflow: hidden; }
background-color: #f5f5f5; .progress[value] {
color: #0074d9;
border: 0;
appearance: none;
}
.progress[value]::-webkit-progress-bar {
background-color: #eee;
border-radius: .2rem; border-radius: .2rem;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -webkit-box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
} }
.progress-bar { .progress[value]::-webkit-progress-value::before {
float: left; content: attr(value);
width: 0;
height: 100%;
font-size: .85rem;
line-height: 24px;
color: #fff;
text-align: center;
background-color: #027de7;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
}
.progress-striped .progress-bar,
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 40px 40px;
background-size: 40px 40px;
} }
.progress.active .progress-bar, .progress[value]::-webkit-progress-value {
.progress-bar.active { background-color: #0074d9;
-webkit-animation: progress-bar-stripes 2s linear infinite; border-top-left-radius: .2rem;
-o-animation: progress-bar-stripes 2s linear infinite; border-bottom-left-radius: .2rem;
animation: progress-bar-stripes 2s linear infinite;
} }
.progress-bar[aria-valuenow="0"] { .progress[value="0"]::-webkit-progress-value {
min-width: 30px; min-width: 2rem;
color: #818a91; color: #818a91;
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
-webkit-box-shadow: none;
box-shadow: none;
} }
.progress-bar-success { .progress[value="100"]::-webkit-progress-value {
background-color: #5cb85c; border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
@-moz-document url-prefix() {
.progress[value] {
background-color: #eee;
border-radius: .2rem;
box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
}
.progress[value]::-moz-progress-bar {
background-color: #0074d9;
border-top-left-radius: .2rem;
border-bottom-left-radius: .2rem;
}
.progress[value="0"]::-moz-progress-bar {
min-width: 2rem;
color: #818a91;
background-color: transparent;
background-image: none;
}
.progress[value="100"]::-moz-progress-bar {
border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
}
@media screen and (min-width:0\0) {
.progress {
background-color: #eee;
border-radius: .2rem;
-webkit-box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
}
.progress-bar {
display: inline-block;
height: 24px;
text-indent: -999rem;
background-color: #0074d9;
border-top-left-radius: .2rem;
border-bottom-left-radius: .2rem;
}
.progress[width^="0"] {
min-width: 2rem;
color: #818a91;
background-color: transparent;
background-image: none;
}
.progress[width="100%"] {
border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
} }
.progress-striped .progress-bar-success { .progress-striped[value]::-webkit-progress-value {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 24px 24px;
background-size: 24px 24px;
} }
.progress-bar-info { .progress-striped[value]::-moz-progress-bar {
background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-size: 24px 24px;
}
@media screen and (min-width:0\0) {
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 24px 24px;
background-size: 24px 24px;
}
}
.progress-animated[value]::-webkit-progress-value {
-webkit-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
.progress-animated[value]::-moz-progress-bar {
animation: progress-bar-stripes 2s linear infinite;
}
@media screen and (min-width:0\0) {
.progress-animated .progress-bar-striped {
-webkit-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
}
.progress-success[value]::-webkit-progress-value {
background-color: #5cb85c;
}
.progress-success[value]::-moz-progress-bar {
background-color: #5cb85c;
} }
.progress-bar-warning { @media screen and (min-width:0\0) {
.progress-success .progress-bar {
background-color: #5cb85c;
}
}
.progress-info[value]::-webkit-progress-value {
background-color: #5bc0de;
}
.progress-info[value]::-moz-progress-bar {
background-color: #5bc0de;
}
@media screen and (min-width:0\0) {
.progress-info .progress-bar {
background-color: #5bc0de;
}
}
.progress-warning[value]::-webkit-progress-value {
background-color: #f0ad4e; background-color: #f0ad4e;
} }
.progress-striped .progress-bar-warning { .progress-warning[value]::-moz-progress-bar {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-color: #f0ad4e;
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
} }
.progress-bar-danger { @media screen and (min-width:0\0) {
.progress-warning .progress-bar {
background-color: #f0ad4e;
}
}
.progress-danger[value]::-webkit-progress-value {
background-color: #d9534f; background-color: #d9534f;
} }
.progress-striped .progress-bar-danger { .progress-danger[value]::-moz-progress-bar {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-color: #d9534f;
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); }
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); @media screen and (min-width:0\0) {
.progress-danger .progress-bar {
background-color: #d9534f;
}
} }
.media, .media,
.media-body { .media-body {
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -21,4 +21,4 @@ var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseI ...@@ -21,4 +21,4 @@ var Holder=Holder||{};!function(a,b){function c(a,b,c){b=parseInt(b,10),a=parseI
* Licensed under the Creative Commons Attribution 3.0 Unported License. For * Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/. * details, see http://creativecommons.org/licenses/by/3.0/.
*/ */
!function(a){"use strict";a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".active .bs-docs-sidenav"}),b.on("load",function(){c.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()}),function(){var b=a("#bs-theme-stylesheet"),c=a(".bs-docs-theme-toggle"),d=function(){b.attr("href",b.attr("data-href")),c.text("Disable theme preview"),localStorage.setItem("previewTheme",!0)};localStorage.getItem("previewTheme")&&d(),c.click(function(){var a=b.attr("href");a&&0!==a.indexOf("data")?(b.attr("href",""),c.text("Preview theme"),localStorage.removeItem("previewTheme")):d()})}(),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b=a(this),c=b.prev(),d='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';c.hasClass("bs-example")?c.before(d.replace(/btn-clipboard/,"btn-clipboard with-example")):b.before(d)});var d=new ZeroClipboard(a(".btn-clipboard")),e=a("#global-zeroclipboard-html-bridge");d.on("load",function(){e.data("placement","top").attr("title","Copy to clipboard").tooltip()}),d.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),d.on("complete",function(){e.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),d.on("noflash wrongflash",function(){e.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery); !function(a){"use strict";a(function(){var b=a(window),c=a(document.body);c.scrollspy({target:".active .bs-docs-sidenav"}),b.on("load",function(){c.scrollspy("refresh")}),a(".bs-docs-container [href=#]").click(function(a){a.preventDefault()})(function(){var b=a("#bs-theme-stylesheet"),c=a(".bs-docs-theme-toggle"),d=function(){b.attr("href",b.attr("data-href")),c.text("Disable theme preview"),localStorage.setItem("previewTheme",!0)};localStorage.getItem("previewTheme")&&d(),c.click(function(){var a=b.attr("href");a&&0!==a.indexOf("data")?(b.attr("href",""),c.text("Preview theme"),localStorage.removeItem("previewTheme")):d()})}),a(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"}),a(".popover-demo").popover({selector:'[data-toggle="popover"]',container:"body"}),a(".tooltip-test").tooltip(),a(".popover-test").popover(),a(".bs-docs-popover").popover(),a(".bs-docs-popover-dismiss").popover({trigger:"focus"}),a("#loading-example-btn").click(function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b=a(this),c=b.prev(),d='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';c.hasClass("bs-example")?c.before(d.replace(/btn-clipboard/,"btn-clipboard with-example")):b.before(d)});var d=new ZeroClipboard(a(".btn-clipboard")),e=a("#global-zeroclipboard-html-bridge");d.on("load",function(){e.data("placement","top").attr("title","Copy to clipboard").tooltip()}),d.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),d.on("complete",function(){e.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),d.on("noflash wrongflash",function(){e.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
\ No newline at end of file \ No newline at end of file
...@@ -4062,7 +4062,7 @@ a.list-group-item.active > .badge, ...@@ -4062,7 +4062,7 @@ a.list-group-item.active > .badge,
} }
@-webkit-keyframes progress-bar-stripes { @-webkit-keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
...@@ -4070,7 +4070,7 @@ a.list-group-item.active > .badge, ...@@ -4070,7 +4070,7 @@ a.list-group-item.active > .badge,
} }
@-o-keyframes progress-bar-stripes { @-o-keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
...@@ -4078,89 +4078,175 @@ a.list-group-item.active > .badge, ...@@ -4078,89 +4078,175 @@ a.list-group-item.active > .badge,
} }
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { from {
background-position: 40px 0; background-position: 24px 0;
} }
to { to {
background-position: 0 0; background-position: 0 0;
} }
} }
.progress { .progress {
display: block;
width: 100%;
height: 24px; height: 24px;
margin-bottom: 24px; margin-bottom: 24px;
overflow: hidden; }
background-color: #f5f5f5; .progress[value] {
color: #0074d9;
border: 0;
appearance: none;
}
.progress[value]::-webkit-progress-bar {
background-color: #eee;
border-radius: .2rem; border-radius: .2rem;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -webkit-box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
} }
.progress-bar { .progress[value]::-webkit-progress-value::before {
float: left; content: attr(value);
width: 0;
height: 100%;
font-size: .85rem;
line-height: 24px;
color: #fff;
text-align: center;
background-color: #027de7;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
}
.progress-striped .progress-bar,
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 40px 40px;
background-size: 40px 40px;
} }
.progress.active .progress-bar, .progress[value]::-webkit-progress-value {
.progress-bar.active { background-color: #0074d9;
-webkit-animation: progress-bar-stripes 2s linear infinite; border-top-left-radius: .2rem;
-o-animation: progress-bar-stripes 2s linear infinite; border-bottom-left-radius: .2rem;
animation: progress-bar-stripes 2s linear infinite;
} }
.progress-bar[aria-valuenow="0"] { .progress[value="0"]::-webkit-progress-value {
min-width: 30px; min-width: 2rem;
color: #818a91; color: #818a91;
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
-webkit-box-shadow: none;
box-shadow: none;
} }
.progress-bar-success { .progress[value="100"]::-webkit-progress-value {
background-color: #5cb85c; border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
@-moz-document url-prefix() {
.progress[value] {
background-color: #eee;
border-radius: .2rem;
box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
}
.progress[value]::-moz-progress-bar {
background-color: #0074d9;
border-top-left-radius: .2rem;
border-bottom-left-radius: .2rem;
}
.progress[value="0"]::-moz-progress-bar {
min-width: 2rem;
color: #818a91;
background-color: transparent;
background-image: none;
}
.progress[value="100"]::-moz-progress-bar {
border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
}
@media screen and (min-width:0\0) {
.progress {
background-color: #eee;
border-radius: .2rem;
-webkit-box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
box-shadow: inset 0 .1rem .1rem rgba(0, 0, 0, .1);
}
.progress-bar {
display: inline-block;
height: 24px;
text-indent: -999rem;
background-color: #0074d9;
border-top-left-radius: .2rem;
border-bottom-left-radius: .2rem;
}
.progress[width^="0"] {
min-width: 2rem;
color: #818a91;
background-color: transparent;
background-image: none;
}
.progress[width="100%"] {
border-top-right-radius: .2rem;
border-bottom-right-radius: .2rem;
}
} }
.progress-striped .progress-bar-success { .progress-striped[value]::-webkit-progress-value {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 24px 24px;
background-size: 24px 24px;
} }
.progress-bar-info { .progress-striped[value]::-moz-progress-bar {
background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-size: 24px 24px;
}
@media screen and (min-width:0\0) {
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-webkit-background-size: 24px 24px;
background-size: 24px 24px;
}
}
.progress-animated[value]::-webkit-progress-value {
-webkit-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
.progress-animated[value]::-moz-progress-bar {
animation: progress-bar-stripes 2s linear infinite;
}
@media screen and (min-width:0\0) {
.progress-animated .progress-bar-striped {
-webkit-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
}
.progress-success[value]::-webkit-progress-value {
background-color: #5cb85c;
}
.progress-success[value]::-moz-progress-bar {
background-color: #5cb85c;
} }
.progress-bar-warning { @media screen and (min-width:0\0) {
.progress-success .progress-bar {
background-color: #5cb85c;
}
}
.progress-info[value]::-webkit-progress-value {
background-color: #5bc0de;
}
.progress-info[value]::-moz-progress-bar {
background-color: #5bc0de;
}
@media screen and (min-width:0\0) {
.progress-info .progress-bar {
background-color: #5bc0de;
}
}
.progress-warning[value]::-webkit-progress-value {
background-color: #f0ad4e; background-color: #f0ad4e;
} }
.progress-striped .progress-bar-warning { .progress-warning[value]::-moz-progress-bar {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-color: #f0ad4e;
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
} }
.progress-bar-danger { @media screen and (min-width:0\0) {
.progress-warning .progress-bar {
background-color: #f0ad4e;
}
}
.progress-danger[value]::-webkit-progress-value {
background-color: #d9534f; background-color: #d9534f;
} }
.progress-striped .progress-bar-danger { .progress-danger[value]::-moz-progress-bar {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); background-color: #d9534f;
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); }
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); @media screen and (min-width:0\0) {
.progress-danger .progress-bar {
background-color: #d9534f;
}
} }
.media, .media,
.media-body { .media-body {
......
This diff was suppressed by a .gitattributes entry.
This source diff could not be displayed because it is too large. You can view the blob instead.
// Progress bars // Progress bars
.progress-bar-variant(@color) { .progress-variant(@color) {
background-color: @color; &[value]::-webkit-progress-value {
background-color: @color;
// Deprecated parent class requirement as of v3.2.0 }
.progress-striped & { &[value]::-moz-progress-bar {
#gradient > .striped(); background-color: @color;
}
@media screen and (~"min-width:0\0") {
.progress-bar {
background-color: @color;
}
} }
} }
...@@ -3,98 +3,165 @@ ...@@ -3,98 +3,165 @@
// -------------------------------------------------- // --------------------------------------------------
// Bar animations //
// ------------------------- // Progress animations
//
// WebKit
@-webkit-keyframes progress-bar-stripes { @-webkit-keyframes progress-bar-stripes {
from { background-position: 40px 0; } from { background-position: @line-height-computed 0; }
to { background-position: 0 0; } to { background-position: 0 0; }
} }
// Spec and IE10+
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { background-position: 40px 0; } from { background-position: @line-height-computed 0; }
to { background-position: 0 0; } to { background-position: 0 0; }
} }
//
// Basic progress bar
//
// Bar itself
// -------------------------
// Outer container
.progress { .progress {
overflow: hidden; display: block;
width: 100%;
height: @line-height-computed; height: @line-height-computed;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
background-color: @progress-bg; }
.progress[value] {
// Reset the default appearance
appearance: none;
// Remove Firefox and Opera border
border: 0;
// IE10 uses `color` to set the bar background-color
color: #0074d9;
}
.progress[value]::-webkit-progress-bar {
background-color: #eee;
.border-radius(@border-radius-base); .border-radius(@border-radius-base);
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
}
.progress[value]::-webkit-progress-value::before {
content: attr(value);
}
.progress[value]::-webkit-progress-value {
background-color: #0074d9;
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
.progress[value="0"]::-webkit-progress-value {
color: @gray-light;
min-width: 2rem;
background-color: transparent;
background-image: none;
}
.progress[value="100"]::-webkit-progress-value {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
} }
// Bar of progress // Firefox styles must be entirely separate or it busts Webkit styles.
.progress-bar { @-moz-document url-prefix() {
float: left; .progress[value] {
width: 0%; background-color: #eee;
height: 100%; .border-radius(@border-radius-base);
font-size: @font-size-small; .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
line-height: @line-height-computed; }
color: @progress-bar-color; .progress[value]::-moz-progress-bar {
text-align: center; background-color: #0074d9;
background-color: @progress-bar-bg; border-top-left-radius: @border-radius-base;
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); border-bottom-left-radius: @border-radius-base;
transition: width .6s ease; }
.progress[value="0"]::-moz-progress-bar {
color: @gray-light;
min-width: 2rem;
background-color: transparent;
background-image: none;
}
.progress[value="100"]::-moz-progress-bar {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
} }
// Striped bars // IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
@media screen and (~"min-width:0\0") {
.progress {
background-color: #eee;
.border-radius(@border-radius-base);
.box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
}
.progress-bar {
display: inline-block;
height: @line-height-computed;
text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
background-color: #0074d9;
border-top-left-radius: @border-radius-base;
border-bottom-left-radius: @border-radius-base;
}
.progress[width^="0"] {
color: @gray-light;
min-width: 2rem;
background-color: transparent;
background-image: none;
}
.progress[width="100%"] {
border-top-right-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
}
// //
// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the // Striped
// `.progress-bar-striped` class, which you just add to an existing //
// `.progress-bar`.
.progress-striped .progress-bar, .progress-striped[value]::-webkit-progress-value {
.progress-bar-striped { #gradient > .striped();
background-size: @line-height-computed @line-height-computed;
}
.progress-striped[value]::-moz-progress-bar {
#gradient > .striped(); #gradient > .striped();
background-size: 40px 40px; background-size: @line-height-computed @line-height-computed;
}
@media screen and (~"min-width:0\0") {
.progress-bar-striped {
#gradient > .striped();
background-size: @line-height-computed @line-height-computed;
}
} }
// Call animation for the active one
//
// Animated
// //
// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
// `.progress-bar.active` approach. .progress-animated[value]::-webkit-progress-value {
.progress.active .progress-bar,
.progress-bar.active {
animation: progress-bar-stripes 2s linear infinite; animation: progress-bar-stripes 2s linear infinite;
} }
.progress-animated[value]::-moz-progress-bar {
// Account for lower percentages animation: progress-bar-stripes 2s linear infinite;
.progress-bar { }
&[aria-valuenow="0"] { @media screen and (~"min-width:0\0") {
color: @gray-light; .progress-animated .progress-bar-striped {
min-width: 30px; animation: progress-bar-stripes 2s linear infinite;
background-color: transparent;
background-image: none;
.box-shadow(none);
} }
} }
//
// Variations // Variations
// ------------------------- //
.progress-bar-success { .progress-success {
.progress-bar-variant(@progress-bar-success-bg); .progress-variant(@progress-bar-success-bg);
} }
.progress-info {
.progress-bar-info { .progress-variant(@progress-bar-info-bg);
.progress-bar-variant(@progress-bar-info-bg);
} }
.progress-warning {
.progress-bar-warning { .progress-variant(@progress-bar-warning-bg);
.progress-bar-variant(@progress-bar-warning-bg);
} }
.progress-danger {
.progress-bar-danger { .progress-variant(@progress-bar-danger-bg);
.progress-bar-variant(@progress-bar-danger-bg);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment