From 54537b500ee5a0c7c31067170a119698ffeae1fc Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 9 Jul 2014 01:39:34 -0700 Subject: Refactor: drop all custom .progress-bar styles and replace with element --- docs/_includes/components/progress-bars.html | 189 ++++++--------------------- 1 file changed, 43 insertions(+), 146 deletions(-) (limited to 'docs/_includes/components/progress-bars.html') diff --git a/docs/_includes/components/progress-bars.html b/docs/_includes/components/progress-bars.html index a77afc161..949c2368f 100644 --- a/docs/_includes/components/progress-bars.html +++ b/docs/_includes/components/progress-bars.html @@ -1,182 +1,79 @@

Progress bars

-

Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.

- -
-

Cross-browser compatibility

-

Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in Internet Explorer 9 and below or older versions of Firefox. Opera 12 does not support animations.

-
+

Stylize the HTML5 <progress> element with a few extra classes and some crafty browser-specific CSS. Be sure to read up on the browser support.

Basic example

Default progress bar.

-
-
- 60% Complete -
-
+ 0% + 25% + 50% + 75% + 100%
{% highlight html %} -
-
- 60% Complete -
-
+0% +25% +50% +75% +100% {% endhighlight %} -

With label

-

Remove the .sr-only class from within the progress bar to show a visible percentage. For low percentages, consider adding a min-width to ensure the label's text is fully visible.

+

Internet Explorer 9 support

+

IE9 doesn't support the HTML5 <progress> element, but we can work around that.

-
-
- 60% + +
+ 25%
-
+
{% highlight html %} -
-
- 60% + +
+ 25%
-
+ {% endhighlight %}

Contextual alternatives

Progress bars use some of the same button and alert classes for consistent styles.

-
-
- 40% Complete (success) -
-
-
-
- 20% Complete -
-
-
-
- 60% Complete (warning) -
-
-
-
- 80% Complete (danger) -
-
+ 25% + 50% + 75% + 100%
{% highlight html %} -
-
- 40% Complete (success) -
-
-
-
- 20% Complete -
-
-
-
- 60% Complete (warning) -
-
-
-
- 80% Complete -
-
+25% +50% +75% +100% {% endhighlight %}

Striped

-

Uses a gradient to create a striped effect. Not available in IE8.

+

Uses a gradient to create a striped effect.

-
-
- 40% Complete (success) -
-
-
-
- 20% Complete -
-
-
-
- 60% Complete (warning) -
-
-
-
- 80% Complete (danger) -
-
+ 10% + 25% + 50% + 75% + 100%
{% highlight html %} -
-
- 40% Complete (success) -
-
-
-
- 20% Complete -
-
-
-
- 60% Complete (warning) -
-
-
-
- 80% Complete (danger) -
-
+10% +25% +50% +75% +100% {% endhighlight %}

Animated

-

Add .active to .progress-bar-striped to animate the stripes right to left. Not available in IE9 and below.

-
-
-
45% Complete
-
-
-{% highlight html %} -
-
- 45% Complete -
-
-{% endhighlight %} - -

Stacked

-

Place multiple bars into the same .progress to stack them.

+

Add .progress-animated to .progress to animate the stripes right to left via CSS3 animations. Animated progress bars do not work in IE9, older versions of Firefox, and Opera 12 as they don't support CSS3 animations.

-
-
- 35% Complete (success) -
-
- 20% Complete (warning) -
-
- 10% Complete (danger) -
-
+ 25%
{% highlight html %} -
-
- 35% Complete (success) -
-
- 20% Complete (warning) -
-
- 10% Complete (danger) -
-
+25% {% endhighlight %} -
-- cgit v1.2.3