Commit 80144d74 authored by Mark Otto's avatar Mark Otto
Browse files

Merge branch 'v4-dev' into v4-forms-cleanup

parents 325c1d4c 2cc75671
17 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!26437merge,!26197V4 dev xmr,!20778V4 dev,!20539Allow multiple modals,!20493V4 dev display,!20636Fix docs for heading sizes,!22547Finished a new translation for bootstrap,!22143Fix selectable disabled toggle radio buttons,!22598test,!21067dfsa,!25326Adjust examples,!23995Add back cursor: pointer for .btn-link,!23178Spinner,!19141v4: Forms cleanup,!17021v4
Showing with 369 additions and 94 deletions
+369 -94
...@@ -24,22 +24,22 @@ The most basic list group is simply an unordered list with list items, and the p ...@@ -24,22 +24,22 @@ The most basic list group is simply an unordered list with list items, and the p
</ul> </ul>
{% endexample %} {% endexample %}
## Labels ## Tags
Add labels to any list group item to show unread counts, activity, etc. Add tags to any list group item to show unread counts, activity, etc.
{% example html %} {% example html %}
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<span class="label label-default label-pill pull-xs-right">14</span> <span class="tag tag-default tag-pill pull-xs-right">14</span>
Cras justo odio Cras justo odio
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<span class="label label-default label-pill pull-xs-right">2</span> <span class="tag tag-default tag-pill pull-xs-right">2</span>
Dapibus ac facilisis in Dapibus ac facilisis in
</li> </li>
<li class="list-group-item"> <li class="list-group-item">
<span class="label label-default label-pill pull-xs-right">1</span> <span class="tag tag-default tag-pill pull-xs-right">1</span>
Morbi leo risus Morbi leo risus
</li> </li>
</ul> </ul>
...@@ -104,6 +104,9 @@ Use contextual classes to style list items, default or linked. Also includes `.a ...@@ -104,6 +104,9 @@ Use contextual classes to style list items, default or linked. Also includes `.a
</div> </div>
{% endexample %} {% endexample %}
{% capture callout-include %}{% include callout-warning-color-assistive-technologies.md %}{% endcapture %}
{{ callout-include | markdownify }}
## Custom content ## Custom content
Add nearly any HTML within, even for linked list groups like the one below. Add nearly any HTML within, even for linked list groups like the one below.
......
...@@ -34,7 +34,7 @@ Always try to place a modal's HTML code in a top-level position in your document ...@@ -34,7 +34,7 @@ Always try to place a modal's HTML code in a top-level position in your document
{% callout warning %} {% callout warning %}
#### Mobile device caveats #### Mobile device caveats
There are some caveats regarding using modals on mobile devices. [See our browser support docs]({{ site.baseurl }}/getting-started/browsers-devices/#modals-navbars-and-virtual-keyboards) for details. There are some caveats regarding using modals on mobile devices. [See our browser support docs]({{ site.baseurl }}/getting-started/browsers-devices/#modals-and-dropdowns-on-mobile) for details.
{% endcallout %} {% endcallout %}
### Static example ### Static example
......
...@@ -265,7 +265,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap ...@@ -265,7 +265,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<td>An array of constraints - passed through to Tether. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">constraint docs</a>.</td> <td>An array of constraints - passed through to Tether. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">constraint docs</a>.</td>
</tr> </tr>
<tr> <tr>
<td>offsets</td> <td>offset</td>
<td>string</td> <td>string</td>
<td>'0 0'</td> <td>'0 0'</td>
<td>Offset of the popover relative to its target. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#offset">offset docs</a>.</td> <td>Offset of the popover relative to its target. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#offset">offset docs</a>.</td>
......
...@@ -13,12 +13,24 @@ Stylize [the HTML5 `<progress>` element](https://developer.mozilla.org/en-US/doc ...@@ -13,12 +13,24 @@ Stylize [the HTML5 `<progress>` element](https://developer.mozilla.org/en-US/doc
### Example ### Example
To caption a progress bar, simply add a `<div>` with your caption text, [align the text using a utility class]({{ site.baseurl }}/components/utilities/#text-alignment), and associate the caption with the `<progress>` element using the `aria-describedby` attribute.
{% example html %} {% example html %}
<progress class="progress" value="0" max="100">0%</progress>
<progress class="progress" value="25" max="100">25%</progress> <div class="text-xs-center" id="example-caption-1">Reticulating splines&hellip; 0%</div>
<progress class="progress" value="50" max="100">50%</progress> <progress class="progress" value="0" max="100" aria-describedby="example-caption-1"></progress>
<progress class="progress" value="75" max="100">75%</progress>
<progress class="progress" value="100" max="100">100%</progress> <div class="text-xs-center" id="example-caption-2">Reticulating splines&hellip; 25%</div>
<progress class="progress" value="25" max="100" aria-describedby="example-caption-2"></progress>
<div class="text-xs-center" id="example-caption-3">Reticulating splines&hellip; 50%</div>
<progress class="progress" value="50" max="100" aria-describedby="example-caption-3"></progress>
<div class="text-xs-center" id="example-caption-4">Reticulating splines&hellip; 75%</div>
<progress class="progress" value="75" max="100" aria-describedby="example-caption-4"></progress>
<div class="text-xs-center" id="example-caption-5">Reticulating splines&hellip; 100%</div>
<progress class="progress" value="100" max="100" aria-describedby="example-caption-5"></progress>
{% endexample %} {% endexample %}
### IE9 support ### IE9 support
...@@ -26,9 +38,10 @@ Stylize [the HTML5 `<progress>` element](https://developer.mozilla.org/en-US/doc ...@@ -26,9 +38,10 @@ Stylize [the HTML5 `<progress>` element](https://developer.mozilla.org/en-US/doc
Internet Explorer 9 doesn't support the HTML5 `<progress>` element, but we can work around that. Internet Explorer 9 doesn't support the HTML5 `<progress>` element, but we can work around that.
{% example html %} {% example html %}
<progress class="progress" value="25" max="100"> <div class="text-xs-center" id="example-caption-6">Reticulating splines&hellip; 25%</div>
<progress class="progress" value="25" max="100" aria-describedby="example-caption-6">
<div class="progress"> <div class="progress">
<span class="progress-bar" style="width: 25%;">25%</span> <span class="progress-bar" style="width: 25%;"></span>
</div> </div>
</progress> </progress>
{% endexample %} {% endexample %}
...@@ -38,10 +51,10 @@ Internet Explorer 9 doesn't support the HTML5 `<progress>` element, but we can w ...@@ -38,10 +51,10 @@ Internet Explorer 9 doesn't support the HTML5 `<progress>` element, but we can w
Progress bars use some of the same button and alert classes for consistent styles. Progress bars use some of the same button and alert classes for consistent styles.
{% example html %} {% example html %}
<progress class="progress progress-success" value="25" max="100">25%</progress> <progress class="progress progress-success" value="25" max="100"></progress>
<progress class="progress progress-info" value="50" max="100">50%</progress> <progress class="progress progress-info" value="50" max="100"></progress>
<progress class="progress progress-warning" value="75" max="100">75%</progress> <progress class="progress progress-warning" value="75" max="100"></progress>
<progress class="progress progress-danger" value="100" max="100">100%</progress> <progress class="progress progress-danger" value="100" max="100"></progress>
{% endexample %} {% endexample %}
### Striped ### Striped
...@@ -49,11 +62,11 @@ Progress bars use some of the same button and alert classes for consistent style ...@@ -49,11 +62,11 @@ Progress bars use some of the same button and alert classes for consistent style
Uses a gradient to create a striped effect. Uses a gradient to create a striped effect.
{% example html %} {% example html %}
<progress class="progress progress-striped" value="10" max="100">10%</progress> <progress class="progress progress-striped" value="10" max="100"></progress>
<progress class="progress progress-striped progress-success" value="25" max="100">25%</progress> <progress class="progress progress-striped progress-success" value="25" max="100"></progress>
<progress class="progress progress-striped progress-info" value="50" max="100">50%</progress> <progress class="progress progress-striped progress-info" value="50" max="100"></progress>
<progress class="progress progress-striped progress-warning" value="75" max="100">75%</progress> <progress class="progress progress-striped progress-warning" value="75" max="100"></progress>
<progress class="progress progress-striped progress-danger" value="100" max="100">100%</progress> <progress class="progress progress-striped progress-danger" value="100" max="100"></progress>
{% endexample %} {% endexample %}
### Animated stripes ### Animated stripes
...@@ -63,12 +76,12 @@ The striped gradient can also be animated. Add `.progress-animated` to `.progres ...@@ -63,12 +76,12 @@ The striped gradient can also be animated. Add `.progress-animated` to `.progres
**Animated progress bars do not work in IE9 and Opera 12** – as they don't support CSS3 animations – **nor in IE10+ and Microsoft Edge** – as they currently don't support CSS3 animations on the [`::-ms-fill` pseudo-element](https://msdn.microsoft.com/en-us/library/windows/apps/hh465757.aspx). **Animated progress bars do not work in IE9 and Opera 12** – as they don't support CSS3 animations – **nor in IE10+ and Microsoft Edge** – as they currently don't support CSS3 animations on the [`::-ms-fill` pseudo-element](https://msdn.microsoft.com/en-us/library/windows/apps/hh465757.aspx).
<div class="bd-example"> <div class="bd-example">
<progress class="progress progress-striped" value="25" max="100">25%</progress> <progress class="progress progress-striped" value="25" max="100"></progress>
<button type="button" class="btn btn-secondary bd-activate-animated-progressbar" data-toggle="button" aria-pressed="false" autocomplete="off"> <button type="button" class="btn btn-secondary bd-activate-animated-progressbar" data-toggle="button" aria-pressed="false" autocomplete="off">
Toggle animation Toggle animation
</button> </button>
</div> </div>
{% highlight html %} {% highlight html %}
<progress class="progress progress-striped progress-animated" value="25" max="100">25%</progress> <progress class="progress progress-striped progress-animated" value="25" max="100"></progress>
{% endhighlight %} {% endhighlight %}
...@@ -14,7 +14,7 @@ group: components ...@@ -14,7 +14,7 @@ group: components
The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well. The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.
<div class="bd-example"> <div class="bd-example">
<nav id="navbar-example2" class="navbar navbar-default" role="navigation"> <nav id="navbar-example2" class="navbar navbar-default">
<h3 class="navbar-brand">Project Name</h3> <h3 class="navbar-brand">Project Name</h3>
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link" href="#fat">@fat</a></li> <li class="nav-item"><a class="nav-link" href="#fat">@fat</a></li>
......
This diff is collapsed.
...@@ -229,7 +229,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap ...@@ -229,7 +229,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<td>An array of constraints - passed through to Tether. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">constraint docs</a>.</td> <td>An array of constraints - passed through to Tether. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">constraint docs</a>.</td>
</tr> </tr>
<tr> <tr>
<td>offsets</td> <td>offset</td>
<td>string</td> <td>string</td>
<td>'0 0'</td> <td>'0 0'</td>
<td>Offset of the popover relative to its target. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">offset docs</a>.</td> <td>Offset of the popover relative to its target. For more information refer to Tether's <a href="http://github.hubspot.com/tether/#constraints">offset docs</a>.</td>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -211,7 +211,7 @@ Remove the default `list-style` and left margin on list items (immediate childre ...@@ -211,7 +211,7 @@ Remove the default `list-style` and left margin on list items (immediate childre
### Inline ### Inline
Place all list items on a single line with `display: inline-block;` and some basic margin between. Remove a list's bullets and apply some light `margin` with a combination of two classes, `.list-inline` and `.list-inline-item`.
{% example html %} {% example html %}
<ul class="list-inline"> <ul class="list-inline">
......
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -462,6 +462,8 @@ var Button = (function ($) { ...@@ -462,6 +462,8 @@ var Button = (function ($) {
input.checked = !$(this._element).hasClass(ClassName.ACTIVE); input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
$(this._element).trigger('change'); $(this._element).trigger('change');
} }
input.focus();
} }
} else { } else {
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
......
This diff is collapsed.
...@@ -108,6 +108,8 @@ ...@@ -108,6 +108,8 @@
input.checked = !$(this._element).hasClass(ClassName.ACTIVE); input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
$(this._element).trigger('change'); $(this._element).trigger('change');
} }
input.focus();
} }
} else { } else {
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
......
This diff is collapsed.
Supports Markdown
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