mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
rename classes from .bs-docs and .bs to .bd
This commit is contained in:
parent
3c93681245
commit
c84cf4f7f5
38 changed files with 386 additions and 371 deletions
|
@ -1,7 +1,7 @@
|
|||
<!-- Footer
|
||||
================================================== -->
|
||||
<footer class="bs-docs-footer" role="contentinfo">
|
||||
<div class="bs-docs-container">
|
||||
<footer class="bd-footer" role="contentinfo">
|
||||
<div class="bd-container">
|
||||
{% include social-buttons.html %}
|
||||
|
||||
<p>
|
||||
|
@ -10,7 +10,7 @@
|
|||
Code licensed <a rel="license" href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a>, docs <a rel="license" href="https://creativecommons.org/licenses/by/3.0/" target="_blank">CC BY 3.0</a>.
|
||||
</p>
|
||||
|
||||
<ul class="bs-docs-footer-links text-muted">
|
||||
<ul class="bd-footer-links text-muted">
|
||||
<li>Currently v{{ site.current_version }}</li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ site.repo }}">GitHub</a></li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<header class="navbar navbar-static-top bs-docs-sidebar" id="top" role="banner">
|
||||
<header class="navbar navbar-static-top bd-sidebar" id="top" role="banner">
|
||||
<a href="{{ site.baseurl }}/" class="navbar-brand">
|
||||
Bootstrap
|
||||
</a>
|
||||
|
@ -7,12 +7,12 @@
|
|||
☰
|
||||
</button>
|
||||
|
||||
<form class="bs-docs-search hidden-sm-down">
|
||||
<form class="bd-search hidden-sm-down">
|
||||
<input type="text" class="form-control" id="search-input" placeholder="Search...">
|
||||
<ul class="dropdown-menu bs-docs-search-results" id="search-results"></ul>
|
||||
<ul class="dropdown-menu bd-search-results" id="search-results"></ul>
|
||||
</form>
|
||||
|
||||
<nav class="bs-docs-links collapse hidden-xs-down" id="docsNavbarContent">
|
||||
<nav class="bd-links collapse in hidden-xs-down" id="docsNavbarContent">
|
||||
{% for group in site.data.nav %}
|
||||
{% assign link = group.pages | first %}
|
||||
{% assign slug = group.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' %}
|
||||
|
@ -22,18 +22,18 @@
|
|||
{% assign active = 'active' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="bs-docs-toc-item {{ active }}">
|
||||
<a class="bs-docs-toc-link" href="{{ site.baseurl }}/{{ group.title | downcase | replace: ' ', '-' }}/{{ link.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' }}">
|
||||
<div class="bd-toc-item {{ active }}">
|
||||
<a class="bd-toc-link" href="{{ site.baseurl }}/{{ group.title | downcase | replace: ' ', '-' }}/{{ link.title | downcase | replace: ' ', '-' || page.title | downcase | replace: ' ', '-' }}">
|
||||
{{ group.title }}
|
||||
</a>
|
||||
|
||||
<ul class="nav bs-docs-sidenav">
|
||||
<ul class="nav bd-sidenav">
|
||||
{% for doc in group.pages %}
|
||||
{% assign slug = doc.title | downcase | replace: ' ', '-' %}
|
||||
{% assign active = nil %}
|
||||
|
||||
{% if page.url contains slug %}
|
||||
{% assign active = 'active bs-docs-sidenav-active' %}
|
||||
{% assign active = 'active bd-sidenav-active' %}
|
||||
{% endif %}
|
||||
|
||||
<li class="{{ active }}">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="bs-docs-social">
|
||||
<ul class="bs-docs-social-buttons">
|
||||
<div class="bd-social">
|
||||
<ul class="bd-social-buttons">
|
||||
<li>
|
||||
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=watch&count=true" width="100" height="20" title="Star on GitHub"></iframe>
|
||||
</li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
{% include header.html %}
|
||||
</head>
|
||||
<body class="bs-docs" data-spy="scroll" data-target=".bs-docs-sidenav-active">
|
||||
<body class="bd-docs" data-spy="scroll" data-target=".bd-sidenav-active">
|
||||
<a id="skippy" class="sr-only sr-only-focusable" href="#content">
|
||||
<div class="container">
|
||||
<span class="skiplink-text">Skip to main content</span>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<!-- Meta, title, CSS, favicons, etc. -->
|
||||
{% include header.html %}
|
||||
</head>
|
||||
<body class="bs-docs-home">
|
||||
<body class="bd-home">
|
||||
<a id="skippy" class="sr-only sr-only-focusable" href="#content">
|
||||
<div class="container">
|
||||
<span class="skiplink-text">Skip to main content</span>
|
||||
|
|
|
@ -4,8 +4,8 @@ layout: default
|
|||
|
||||
{% include nav-docs.html %}
|
||||
|
||||
<div class="bs-docs-container bs-docs-content">
|
||||
<div class="bd-container bd-content">
|
||||
{% include ads.html %}
|
||||
<h1 class="bs-docs-title">{{ page.title }}</h1>
|
||||
<h1 class="bd-title">{{ page.title }}</h1>
|
||||
{{ content }}
|
||||
</div>
|
||||
|
|
|
@ -9,19 +9,19 @@ Have a need for Bootstrap's brand resources? Great! We have only a few guideline
|
|||
|
||||
Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Bootstrap**). It should always appear in Helvetica Neue Bold. **Do not use the Twitter bird** in association with Bootstrap.
|
||||
|
||||
<div class="bs-brand-logos">
|
||||
<div class="bs-brand-item">
|
||||
<div class="bs-docs-booticon bs-docs-booticon-lg">B</div>
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<div class="bd-booticon bd-booticon-lg">B</div>
|
||||
</div>
|
||||
<div class="bs-brand-item inverse">
|
||||
<div class="bs-docs-booticon bs-docs-booticon-lg bs-docs-booticon-inverse">B</div>
|
||||
<div class="bd-brand-item inverse">
|
||||
<div class="bd-booticon bd-booticon-lg bd-booticon-inverse">B</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-brand-logos">
|
||||
<div class="bs-brand-item">
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<h1>Bootstrap</h1>
|
||||
</div>
|
||||
<div class="bs-brand-item inverse">
|
||||
<div class="bd-brand-item inverse">
|
||||
<h1>Bootstrap</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,14 +30,14 @@ Use either the Bootstrap mark (a capital **B**) or the standard logo (just **Boo
|
|||
|
||||
Download the Bootstrap mark in one of three styles, each available as an SVG file. Right click, Save as.
|
||||
|
||||
<div class="bs-brand-logos">
|
||||
<div class="bs-brand-item">
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<img class="svg" src="{{ site.baseurl }}/assets/brand/bootstrap-solid.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
<div class="bs-brand-item inverse">
|
||||
<div class="bd-brand-item inverse">
|
||||
<img class="svg" src="{{ site.baseurl }}/assets/brand/bootstrap-outline.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
<div class="bs-brand-item inverse">
|
||||
<div class="bd-brand-item inverse">
|
||||
<img class="svg" src="{{ site.baseurl }}/assets/brand/bootstrap-punchout.svg" alt="Bootstrap" width="144" height="144">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -46,16 +46,16 @@ Download the Bootstrap mark in one of three styles, each available as an SVG fil
|
|||
|
||||
The project and framework should always be referred to as **Bootstrap**. No Twitter before it, no capital _s_, and no abbreviations except for one, a capital **B**.
|
||||
|
||||
<div class="bs-brand-logos">
|
||||
<div class="bs-brand-item">
|
||||
<div class="bd-brand-logos">
|
||||
<div class="bd-brand-item">
|
||||
<h3>Bootstrap</h3>
|
||||
<strong class="text-success">Right</strong>
|
||||
</div>
|
||||
<div class="bs-brand-item">
|
||||
<div class="bd-brand-item">
|
||||
<h3 class="text-muted">BootStrap</h3>
|
||||
<strong class="text-warning">Wrong</strong>
|
||||
</div>
|
||||
<div class="bs-brand-item">
|
||||
<div class="bd-brand-item">
|
||||
<h3 class="text-muted">Twitter Bootstrap</h3>
|
||||
<strong class="text-warning">Wrong</strong>
|
||||
</div>
|
||||
|
@ -65,11 +65,11 @@ The project and framework should always be referred to as **Bootstrap**. No Twit
|
|||
|
||||
Our docs and branding use a handful of primary colors to differentiate what *is* Bootstrap from what *is in* Bootstrap. In other words, if it's purple, it's representative of Bootstrap.
|
||||
|
||||
<div class="bs-brand">
|
||||
<div class="bd-brand">
|
||||
<div class="color-swatches">
|
||||
<div class="color-swatch bs-purple"></div>
|
||||
<div class="color-swatch bs-purple-light"></div>
|
||||
<div class="color-swatch bs-purple-lighter"></div>
|
||||
<div class="color-swatch bs-gray"></div>
|
||||
<div class="color-swatch bd-purple"></div>
|
||||
<div class="color-swatch bd-purple-light"></div>
|
||||
<div class="color-swatch bd-purple-lighter"></div>
|
||||
<div class="color-swatch bd-gray"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Team
|
|||
|
||||
Bootstrap is maintained by the founding team and a small group of invaluable core contributors, with the massive support and involvement of our community.
|
||||
|
||||
<div class="list-group bs-team">
|
||||
<div class="list-group bd-team">
|
||||
{% for member in site.data.core-team %}
|
||||
<div class="list-group-item">
|
||||
<iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user={{ member.user }}&type=follow"></iframe>
|
||||
|
|
2
docs/assets/css/docs.min.css
vendored
2
docs/assets/css/docs.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/assets/js/docs.min.js
vendored
2
docs/assets/js/docs.min.js
vendored
|
@ -23,4 +23,4 @@ License: http://opensource.org/licenses/MIT
|
|||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see http://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
!function(a){"use strict";a(function(){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("#loading-example-btn").on("click",function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),a("#exampleModal").on("show.bs.modal",function(b){var c=a(b.relatedTarget),d=c.data("whatever"),e=a(this);e.find(".modal-title").text("New message to "+d),e.find(".modal-body input").val(d)}),a(".bs-docs-activate-animated-progressbar").on("click",function(){a(this).prev(".progress-striped").toggleClass("progress-animated")}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';a(this).before(b)});var b=new ZeroClipboard(a(".btn-clipboard")),c=a("#global-zeroclipboard-html-bridge");b.on("load",function(){c.data("placement","top").attr("title","Copy to clipboard").tooltip()}),b.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),b.on("complete",function(){c.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),b.on("noflash wrongflash",function(){c.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
|
||||
!function(a){"use strict";a(function(){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(".bd-popover").popover(),a("#loading-example-btn").on("click",function(){var b=a(this);b.button("loading"),setTimeout(function(){b.button("reset")},3e3)}),a("#exampleModal").on("show.bs.modal",function(b){var c=a(b.relatedTarget),d=c.data("whatever"),e=a(this);e.find(".modal-title").text("New message to "+d),e.find(".modal-body input").val(d)}),a(".bd-activate-animated-progressbar").on("click",function(){a(this).prev(".progress-striped").toggleClass("progress-animated")}),ZeroClipboard.config({moviePath:"/assets/flash/ZeroClipboard.swf",hoverClass:"btn-clipboard-hover"}),a(".highlight").each(function(){var b='<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>';a(this).before(b)});var b=new ZeroClipboard(a(".btn-clipboard")),c=a("#global-zeroclipboard-html-bridge");b.on("load",function(){c.data("placement","top").attr("title","Copy to clipboard").tooltip()}),b.on("dataRequested",function(b){var c=a(this).parent().nextAll(".highlight").first();b.setText(c.text())}),b.on("complete",function(){c.attr("title","Copied!").tooltip("fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("fixTitle")}),b.on("noflash wrongflash",function(){c.attr("title","Flash required").tooltip("fixTitle").tooltip("show")})})}(jQuery);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
// var $body = $(document.body)
|
||||
|
||||
// $body.scrollspy({
|
||||
// target: '.active .bs-docs-sidenav'
|
||||
// target: '.active .bd-sidenav'
|
||||
// })
|
||||
// $window.on('load', function () {
|
||||
// $body.scrollspy('refresh')
|
||||
|
@ -47,7 +47,7 @@
|
|||
$('.popover-test').popover()
|
||||
|
||||
// Popover demos
|
||||
$('.bs-docs-popover').popover()
|
||||
$('.bd-popover').popover()
|
||||
|
||||
// Button state demo
|
||||
$('#loading-example-btn').on('click', function () {
|
||||
|
@ -70,7 +70,7 @@
|
|||
})
|
||||
|
||||
// Activate animated progress bar
|
||||
$('.bs-docs-activate-animated-progressbar').on('click', function () {
|
||||
$('.bd-activate-animated-progressbar').on('click', function () {
|
||||
$(this).prev('.progress-striped').toggleClass('progress-animated')
|
||||
})
|
||||
|
||||
|
@ -129,5 +129,5 @@
|
|||
|
||||
;(function () {
|
||||
'use strict';
|
||||
addAnchors('.bs-docs-container > h1, .bs-docs-container > h2, .bs-docs-container > h3, .bs-docs-container > h4, .bs-docs-container > h5');
|
||||
addAnchors('.bd-container > h1, .bd-container > h2, .bd-container > h3, .bd-container > h4, .bd-container > h5');
|
||||
})();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -8,7 +8,7 @@ Bootstrap currently works around several outstanding browser bugs in major brows
|
|||
We publicly list browser bugs that are impacting us here, in the hopes of expediting the process of fixing them. For information on Bootstrap's browser compatibility, [see our browser compatibility docs](../getting-started/#support).
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="bs-docs-browser-bugs table table-bordered table-hover">
|
||||
<table class="bd-browser-bugs table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Browser(s)</th>
|
||||
|
|
|
@ -7,7 +7,7 @@ Provide contextual feedback messages for typical user actions with the handful o
|
|||
|
||||
Wrap any text and an optional dismiss button in `.alert` and one of the four contextual classes (e.g., `.alert-success`) for basic alert messages.
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>No default class</h4>
|
||||
<p>Alerts don't have default classes, only base and modifier classes. A default gray alert doesn't make too much sense, so you're required to specify a type via contextual class. Choose from success, info, warning, or danger.</p>
|
||||
</div>
|
||||
|
@ -41,7 +41,7 @@ Build on any alert by adding an optional `.alert-dismissible` and [close button]
|
|||
</div>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Ensure proper behavior across all devices</h4>
|
||||
<p>Be sure to use the <code><button></code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Button dropdown
|
|||
|
||||
Use any button to trigger a dropdown menu by placing it within a `.btn-group` and providing the proper dropdown menu markup.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Button dropdowns require the <a href="../javascript/#dropdowns">dropdown plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@ Use any button to trigger a dropdown menu by placing it within a `.btn-group` an
|
|||
|
||||
Turn a button into a dropdown toggle with some basic markup changes.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Default</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
|
@ -97,7 +97,7 @@ Turn a button into a dropdown toggle with some basic markup changes.
|
|||
|
||||
Similarly, create split button dropdowns with the same markup changes, only with a separate button.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-secondary">Default</button>
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
|
@ -199,7 +199,7 @@ Similarly, create split button dropdowns with the same markup changes, only with
|
|||
|
||||
Button dropdowns work with buttons of all sizes.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-secondary btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
|
||||
|
@ -280,7 +280,7 @@ Button dropdowns work with buttons of all sizes.
|
|||
|
||||
Trigger dropdown menus above elements by adding `.dropup` to the parent.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-secondary">Dropup</button>
|
||||
|
|
|
@ -5,12 +5,12 @@ title: Button group
|
|||
|
||||
Group a series of buttons together on a single line with the button group. Add on optional JavaScript radio and checkbox style behavior with [our buttons plugin](../javascript/#buttons).
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Tooltips & popovers in button groups require special setting</h4>
|
||||
<p>When using tooltips or popovers on elements within a <code>.btn-group</code>, you'll have to specify the option <code>container: 'body'</code> to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip or popover is triggered).</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Ensure correct <code>role</code> and provide a label</h4>
|
||||
<p>In order for assistive technologies – such as screen readers – to convey that a series of buttons is grouped, an appropriate <code>role</code> attribute needs to be provided. For button groups, this would be <code>role="group"</code>, while toolbars should have a <code>role="toolbar"</code>.</p>
|
||||
<p>In addition, groups and toolbars should be given an explicit label, as most assistive technologies will otherwise not announce them, despite the presence of the correct <code>role</code> attribute. In the examples provided here, we use <code>aria-label</code>, but alternatives such as <code>aria-labelledby</code> can also be used.</p>
|
||||
|
@ -55,7 +55,7 @@ Combine sets of button groups into button toolbars for more complex components.
|
|||
|
||||
Instead of applying button sizing classes to every button in a group, just add `.btn-group-*` to each `.btn-group`, including each one when nesting multiple groups.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-group btn-group-lg" role="group" aria-label="Large button group">
|
||||
<button type="button" class="btn btn-secondary">Left</button>
|
||||
<button type="button" class="btn btn-secondary">Middle</button>
|
||||
|
@ -113,7 +113,7 @@ Place a `.btn-group` within another `.btn-group` when you want dropdown menus mi
|
|||
|
||||
Make a set of buttons appear vertically stacked rather than horizontally. **Split button dropdowns are not supported here.**
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-group-vertical" role="group" aria-label="Vertical button group">
|
||||
<button type="button" class="btn btn-secondary">Button</button>
|
||||
<button type="button" class="btn btn-secondary">Button</button>
|
||||
|
|
|
@ -36,12 +36,12 @@ A slideshow component for cycling through elements—images or slides of text—
|
|||
</div>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-carousel-transitions">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-carousel-transitions">
|
||||
<h4>Transition animations not supported in Internet Explorer 9</h4>
|
||||
<p>Bootstrap exclusively uses CSS3 for its animations, but Internet Explorer 9 doesn't support the necessary CSS properties. Thus, there are no slide transition animations when using that browser. We have intentionally decided not to include jQuery-based fallbacks for the transitions.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-carousel-active">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-carousel-active">
|
||||
<h4>Initial active element required</h4>
|
||||
<p>The <code>.active</code> class needs to be added to one of the slides. Otherwise, the carousel will not be visible.</p>
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@ A slideshow component for cycling through elements—images or slides of text—
|
|||
|
||||
Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. Place just about any optional HTML within there and it will be automatically aligned and formatted.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div id="carousel-example-captions" class="carousel slide" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li>
|
||||
|
@ -101,7 +101,7 @@ Add captions to your slides easily with the `.carousel-caption` element within a
|
|||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Accessibility issue</h4>
|
||||
<p>The carousel component is generally not compliant with accessibility standards. If you need to be compliant, please consider other options for presenting your content.</p>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Collapse
|
|||
|
||||
Flexible plugin that utilizes a handful of classes for easy toggle behavior.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Collapse requires the <a href="#transitions">transitions plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
|
@ -87,7 +87,7 @@ Extend the default collapse behavior to create an accordion with the panel compo
|
|||
</div>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Make expand/collapse controls accessible</h4>
|
||||
<p>Be sure to add <code>aria-expanded</code> to the control element. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of <code>aria-expanded="false"</code>. If you've set the collapsible element to be open by default using the <code>in</code> class, set <code>aria-expanded="true"</code> on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.</p>
|
||||
<p>Additionally, if your control element is targetting a single collapsible element – i.e. the <code>data-target</code> attribute is pointing to an <code>id</code> selector – you may add an additional <code>aria-controls</code> attribute to the control element, containing the <code>id</code> of the collapsible element. Modern screen readers and similar assistive technologies make use of this attribute to provide users with additional shortcuts to navigate directly to the collapsible element itself.</p>
|
||||
|
|
|
@ -31,7 +31,7 @@ In the checked states, we use **base64 embedded SVG icons** from [Open Iconic](h
|
|||
|
||||
Custom checkboxes can also utilize the `:indeterminate` pseudo class.
|
||||
|
||||
<div class="bs-example bs-example-indeterminate">
|
||||
<div class="bd-example bd-example-indeterminate">
|
||||
<label class="c-input c-checkbox">
|
||||
<input type="checkbox">
|
||||
<span class="c-indicator"></span>
|
||||
|
|
|
@ -32,7 +32,7 @@ Wrap the dropdown's trigger and the dropdown menu within `.dropdown`, or another
|
|||
|
||||
By default, a dropdown menu is automatically positioned 100% from the top and along the left side of its parent. Add `.dropdown-menu-right` to a `.dropdown-menu` to right align the dropdown menu.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>May require additional positioning</h4>
|
||||
<p>Dropdowns are automatically positioned via CSS within the normal flow of the document. This means dropdowns may be cropped by parents with certain <code>overflow</code> properties or appear out of bounds of the viewport. Address these issues on your own as they arise.</p>
|
||||
</div>
|
||||
|
@ -146,7 +146,7 @@ Call the dropdowns via JavaScript:
|
|||
$('.dropdown-toggle').dropdown()
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4><code>data-toggle="dropdown"</code> still required</h4>
|
||||
<p>Regardless of whether you call your dropdown via JavaScript or instead use the data-api, <code>data-toggle="dropdown"</code> is always required to be present on the dropdown's trigger element.</p>
|
||||
</div>
|
||||
|
|
|
@ -16,11 +16,11 @@ Convey meaning through color with a handful of emphasis utility classes. These m
|
|||
<p class="text-danger">Donec ullamcorper nulla non metus auctor fringilla.</p>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <code><span></code> with the class.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the contextual colors are only used to reinforce meaning that is already present in the text/markup), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
|
@ -37,12 +37,12 @@ Similar to the contextual text color classes, easily set the background of an el
|
|||
<div class="bg-danger">Donec ullamcorper nulla non metus auctor fringilla.</div>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Dealing with specificity</h4>
|
||||
<p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>As with <a href="#helper-classes-colors">contextual colors</a>, ensure that any meaning conveyed through color is also conveyed in a format that is not purely presentational.</p>
|
||||
</div>
|
||||
|
|
|
@ -13,15 +13,15 @@ $('#myModal').on('shown.bs.modal', function () {
|
|||
})
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-stacked-modals">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-stacked-modals">
|
||||
<h4>Overlapping modals not supported</h4>
|
||||
<p>Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning" id="callout-modal-markup-placement">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-modal-markup-placement">
|
||||
<h4>Modal markup placement</h4>
|
||||
<p>Always try to place a modal's HTML code in a top-level position in your document to avoid other components affecting the modal's appearance and/or functionality.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Mobile device caveats</h4>
|
||||
<p>There are some caveats regarding using modals on mobile devices. <a href="../getting-started/#support-fixed-position-keyboards">See our browser support docs</a> for details.</p>
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@ $('#myModal').on('shown.bs.modal', function () {
|
|||
|
||||
A rendered modal with header, body, and set of actions in the footer.</p>
|
||||
|
||||
<div class="bs-example bs-example-modal">
|
||||
<div class="bd-example bd-example-modal">
|
||||
<div class="modal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -123,7 +123,7 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
|
|||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
<div class="bs-example" style="padding-bottom: 24px;">
|
||||
<div class="bd-example" style="padding-bottom: 24px;">
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
|
@ -158,13 +158,13 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
|
|||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Make modals accessible</h4>
|
||||
<p>Be sure to add <code>role="dialog"</code> to <code>.modal</code>, <code>aria-labelledby="myModalLabel"</code> attribute to reference the modal title, and <code>aria-hidden="true"</code> to tell assistive technologies to skip the modal's DOM elements.</p>
|
||||
<p>Additionally, you may give a description of your modal dialog with <code>aria-describedby</code> on <code>.modal</code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Embedding YouTube videos</h4>
|
||||
<p>Embedding YouTube videos in modals requires additional JavaScript not in Bootstrap to automatically stop playback and more. <a href="http://stackoverflow.com/questions/18622508/bootstrap-3-and-youtube-in-modal">See this helpful Stack Overflow post</a> for more information.</p>
|
||||
</div>
|
||||
|
@ -173,16 +173,16 @@ Toggle a modal via JavaScript by clicking the button below. It will slide down a
|
|||
|
||||
Modals have two optional sizes, available via modifier classes to be placed on a `.modal-dialog`.
|
||||
|
||||
<div class="bs-example">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
<div class="bd-example">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-lg">Large modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-sm">Small modal</button>
|
||||
</div>
|
||||
|
||||
{% highlight html %}
|
||||
<!-- Large modal -->
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg">Large modal</button>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-lg">Large modal</button>
|
||||
|
||||
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
...
|
||||
|
@ -191,9 +191,9 @@ Modals have two optional sizes, available via modifier classes to be placed on a
|
|||
</div>
|
||||
|
||||
<!-- Small modal -->
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-sm">Small modal</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-sm">Small modal</button>
|
||||
|
||||
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
...
|
||||
|
@ -202,7 +202,7 @@ Modals have two optional sizes, available via modifier classes to be placed on a
|
|||
</div>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal fade bd-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
|
@ -220,7 +220,7 @@ Modals have two optional sizes, available via modifier classes to be placed on a
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
|
||||
|
@ -295,7 +295,7 @@ To take advantage of the Bootstrap grid system within a modal, just nest `.conta
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bs-example bs-example-padded-bottom">
|
||||
<div class="bd-example bd-example-padded-bottom">
|
||||
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#gridSystemModal">
|
||||
Launch demo modal
|
||||
</button>
|
||||
|
@ -307,7 +307,7 @@ To take advantage of the Bootstrap grid system within a modal, just nest `.conta
|
|||
Have a bunch of buttons that all trigger the same modal, just with slightly different contents? Use `event.relatedTarget` and [HTML `data-*` attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes) (possibly [via jQuery](http://api.jquery.com/data/)) to vary the contents of the modal depending on which button was clicked. See the Modal Events docs for details on `relatedTarget`.
|
||||
|
||||
{% example html %}
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">Open modal for @mdo</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@fat">Open modal for @fat</button>
|
||||
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@getbootstrap">Open modal for @getbootstrap</button>
|
||||
|
|
|
@ -7,11 +7,11 @@ Add small overlays of content, like those on the iPad, to any element for housin
|
|||
|
||||
Popovers whose both title and content are zero-length are never displayed.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Plugin dependency</h4>
|
||||
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Opt-in functionality</h4>
|
||||
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
|
||||
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
|
||||
|
@ -21,19 +21,19 @@ $(function () {
|
|||
})
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Popovers in button groups and input groups require special setting</h4>
|
||||
<p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Don't try to show popovers on hidden elements</h4>
|
||||
<p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Popovers on disabled elements require wrapper elements</h4>
|
||||
<p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the popover to that <code><div></code> instead.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Multiple-line links</h4>
|
||||
<p>Sometimes you want to add a popover to a hyperlink that wraps multiple lines. The default behavior of the popover plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
|
||||
</div>
|
||||
|
@ -42,7 +42,7 @@ $(function () {
|
|||
|
||||
Four options are available: top, right, bottom, and left aligned.
|
||||
|
||||
<div class="bs-example bs-example-popover">
|
||||
<div class="bd-example bd-example-popover">
|
||||
<div class="popover popover-top">
|
||||
<div class="popover-arrow"></div>
|
||||
<h3 class="popover-title">Popover top</h3>
|
||||
|
@ -82,13 +82,13 @@ Four options are available: top, right, bottom, and left aligned.
|
|||
### Live demo
|
||||
|
||||
{% example html %}
|
||||
<button type="button" class="btn btn-lg btn-danger bs-docs-popover" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
|
||||
<button type="button" class="btn btn-lg btn-danger bd-popover" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>
|
||||
{% endexample %}
|
||||
|
||||
#### Four directions
|
||||
|
||||
<div class="bs-example popover-demo">
|
||||
<div class="bs-example-popovers">
|
||||
<div class="bd-example popover-demo">
|
||||
<div class="bd-example-popovers">
|
||||
<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
|
||||
Popover on left
|
||||
</button>
|
||||
|
@ -127,13 +127,13 @@ sagittis lacus vel augue laoreet rutrum faucibus.">
|
|||
|
||||
Use the `focus` trigger to dismiss popovers on the next click that the user makes.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Specific markup required for dismiss-on-next-click</h4>
|
||||
<p>For proper cross-browser and cross-platform behavior, you must use the <code><a></code> tag, <i>not</i> the <code><button></code> tag, and you also must include a <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#tabindex"><code>tabindex</code></a> attribute.</p>
|
||||
</div>
|
||||
|
||||
{% example html %}
|
||||
<a tabindex="0" class="btn btn-lg btn-danger bs-docs-popover" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
|
||||
<a tabindex="0" class="btn btn-lg btn-danger bd-popover" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>
|
||||
{% endexample %}
|
||||
|
||||
{% highlight js %}
|
||||
|
@ -258,7 +258,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Data attributes for individual popovers</h4>
|
||||
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
|
||||
</div>
|
||||
|
|
|
@ -56,9 +56,9 @@ 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.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<progress class="progress progress-striped" value="25" max="100">25%</progress>
|
||||
<button type="button" class="btn btn-secondary bs-docs-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
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -7,11 +7,11 @@ title: Srollspy
|
|||
|
||||
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="bs-example">
|
||||
<div class="bd-example">
|
||||
<nav id="navbar-example2" class="navbar navbar-default navbar-static" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bs-example-js-navbar-scrollspy">
|
||||
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target=".bd-example-js-navbar-scrollspy">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
|
@ -19,7 +19,7 @@ The ScrollSpy plugin is for automatically updating nav targets based on scroll p
|
|||
</button>
|
||||
<a class="navbar-brand" href="#">Project Name</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse bs-example-js-navbar-scrollspy">
|
||||
<div class="collapse navbar-collapse bd-example-js-navbar-scrollspy">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="#fat">@fat</a></li>
|
||||
<li><a href="#mdo">@mdo</a></li>
|
||||
|
@ -93,12 +93,12 @@ After adding `position: relative;` in your CSS, call the scrollspy via JavaScrip
|
|||
$('body').scrollspy({ target: '#navbar-example' })
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Resolvable ID targets required</h4>
|
||||
<p>Navbar links must have resolvable id targets. For example, a <code><a href="#home">home</a></code> must correspond to something in the DOM like <code><div id="home"></div></code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Non-<code>:visible</code> target elements ignored</h4>
|
||||
<p>Target elements that are not <a href="http://api.jquery.com/visible-selector/"><code>:visible</code> according to jQuery</a> will be ignored and their corresponding nav items will never be highlighted.</p>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@ Tooltips with zero-length titles are never displayed.
|
|||
|
||||
Hover over the links below to see tooltips:
|
||||
|
||||
<div class="bs-example tooltip-demo">
|
||||
<div class="bd-example tooltip-demo">
|
||||
<p class="muted">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
|
||||
</p>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@ Hover over the links below to see tooltips:
|
|||
|
||||
Four options are available: top, right, bottom, and left aligned.
|
||||
|
||||
<div class="bs-example bs-example-tooltip">
|
||||
<div class="bd-example bd-example-tooltip">
|
||||
<div class="tooltip left" role="tooltip">
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner">
|
||||
|
@ -51,8 +51,8 @@ Four options are available: top, right, bottom, and left aligned.
|
|||
|
||||
Hover over the buttons below to see their tooltips.
|
||||
|
||||
<div class="bs-example tooltip-demo">
|
||||
<div class="bs-example-tooltips">
|
||||
<div class="bd-example tooltip-demo">
|
||||
<div class="bd-example-tooltips">
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</button>
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button>
|
||||
<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
|
||||
|
@ -75,7 +75,7 @@ Hover over the buttons below to see their tooltips.
|
|||
</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Opt-in functionality</h4>
|
||||
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
|
||||
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
|
||||
|
@ -85,15 +85,15 @@ $(function () {
|
|||
})
|
||||
{% endhighlight %}
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Tooltips in button groups and input groups require special setting</h4>
|
||||
<p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Don't try to show tooltips on hidden elements</h4>
|
||||
<p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Tooltips on disabled elements require wrapper elements</h4>
|
||||
<p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the tooltip to that <code><div></code> instead.</p>
|
||||
</div>
|
||||
|
@ -112,7 +112,7 @@ $('#example').tooltip(options)
|
|||
|
||||
The required markup for a tooltip is only a `data` attribute and `title` on the HTML element you wish to have a tooltip. The generated markup of a tooltip is rather simple, though it does require a position (by default, set to `top` by the plugin).
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Multiple-line links</h4>
|
||||
<p>Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add <code>white-space: nowrap;</code> to your anchors to avoid this.</p>
|
||||
</div>
|
||||
|
@ -228,7 +228,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Data attributes for individual tooltips</h4>
|
||||
<p>Options for individual tooltips can alternatively be specified through the use of data attributes, as explained above.</p>
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,7 @@ Bootstrap includes six predefined button styles, each serving its own semantic p
|
|||
<button type="button" class="btn btn-link">Link</button>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Conveying meaning to assistive technologies</h4>
|
||||
<p>Using color to add meaning to a button only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (the visible text of the button), or is included through alternative means, such as additional text hidden with the <code>.sr-only</code> class.</p>
|
||||
</div>
|
||||
|
@ -45,12 +45,12 @@ Use the button classes on an `<a>`, `<button>`, or `<input>` element.
|
|||
<input class="btn btn-secondary" type="submit" value="Submit">
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Links acting as buttons</h4>
|
||||
<p>If the <code><a></code> elements are used to act as buttons – triggering in-page functionality, rather than navigating to another document or section within the current page – they should also be given an appropriate <code>role="button"</code>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Cross-browser rendering</h4>
|
||||
<p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p>
|
||||
</div>
|
||||
|
@ -106,17 +106,17 @@ As `<a>` elements don't support the `disabled` attribute, you must add the `.dis
|
|||
<a href="#" class="btn btn-secondary btn-lg disabled" role="button">Link</a>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>If you add the <code>disabled</code> attribute to a <code><button></code>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Link functionality caveat</h4>
|
||||
<p>This class uses <code>pointer-events: none</code> to try to disable the link functionality of <code><a></code>s, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. In addition, even in browsers that do support <code>pointer-events: none</code>, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Context-specific usage</h4>
|
||||
<p>While button classes can be used on <code><a></code> and <code><button></code> elements, only <code><button></code> elements are supported within our nav and navbar components.</p>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,7 @@ Individual form controls automatically receive some global styling. All textual
|
|||
</form>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Don't mix form groups with input groups</h4>
|
||||
<p>Do not mix form groups directly with <a href="/components/#input-groups">input groups</a>. Instead, nest the input group inside of the form group.</p>
|
||||
</div>
|
||||
|
@ -42,11 +42,11 @@ Individual form controls automatically receive some global styling. All textual
|
|||
|
||||
Add `.form-inline` to your `<form>` or a parent element for left-aligned and inline-block controls. **This only applies to form controls within viewports that are at least 768px wide.**
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>May require custom widths</h4>
|
||||
<p>Inputs and selects have `width: 100%;` applied by default in Bootstrap. Within inline forms, we reset that to `width: auto;` so multiple controls can reside on the same line. Depending on your layout, additional custom widths may be required.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Always add labels</h4>
|
||||
<p>Screen readers will have trouble with your forms if you don't include a label for every input. For these inline forms, you can hide the labels using the `.sr-only` class.</p>
|
||||
</div>
|
||||
|
@ -54,7 +54,7 @@ Add `.form-inline` to your `<form>` or a parent element for left-aligned and inl
|
|||
### Visible labels
|
||||
|
||||
{% example html %}
|
||||
<div class="bs-example" data-example-id="simple-form-inline">
|
||||
<div class="bd-example" data-example-id="simple-form-inline">
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputName2">Name</label>
|
||||
|
@ -147,7 +147,7 @@ Examples of standard form controls supported in an example form layout.
|
|||
|
||||
Most common form control, text-based input fields. Includes support for all HTML5 types: `text`, `password`, `datetime`, `datetime-local`, `date`, `month`, `time`, `week`, `number`, `email`, `url`, `search`, `tel`, and `color`.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Type declaration required</h4>
|
||||
<p>Inputs will only be fully styled if their `type` is properly declared.</p>
|
||||
</div>
|
||||
|
@ -156,7 +156,7 @@ Most common form control, text-based input fields. Includes support for all HTML
|
|||
<input type="text" class="form-control" placeholder="Text input">
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Input groups</h4>
|
||||
<p>To add integrated text or buttons before and/or after any text-based `<input>`, <a href="../components/#input-groups">check out the input group component</a>.</p>
|
||||
</div>
|
||||
|
@ -323,13 +323,13 @@ When you need to place plain text next to a form label within a form, use the `.
|
|||
|
||||
We remove the default `outline` styles on some form controls and apply a `box-shadow` in its place for `:focus`.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<form>
|
||||
<input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Demo `:focus` state</h4>
|
||||
<p>The above example input uses custom styles in our documentation to demonstrate the `:focus` state on a `.form-control`.</p>
|
||||
</div>
|
||||
|
@ -367,12 +367,12 @@ Add the `disabled` attribute to a `<fieldset>` to disable all the controls withi
|
|||
</form>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Caveat about link functionality of `<a>`</h4>
|
||||
<p>By default, browsers will treat all native form controls (<code><input></code>, <code><select></code> and <code><button></code> elements) inside a <code><fieldset disabled></code> as disabled, preventing both keyboard and mouse interactions on them. However, if your form also includes <code><a ... class="btn btn-*"></code> elements, these will only be given a style of <code>pointer-events: none</code>. As noted in the section about <a href="#buttons-disabled">disabled state for buttons</a> (and specifically in the sub-section for anchor elements), this CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11, and won't prevent keyboard users from being able to focus or activate these links. So to be safe, use custom JavaScript to disable such links.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p>While Bootstrap will apply these styles in all browsers, Internet Explorer 11 and below don't fully support the <code>disabled</code> attribute on a <code><fieldset></code>. Use custom JavaScript to disable the fieldset in these browsers.</p>
|
||||
</div>
|
||||
|
@ -389,7 +389,7 @@ Add the `readonly` boolean attribute on an input to prevent modification of the
|
|||
|
||||
Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add `.has-warning`, `.has-error`, or `.has-success` to the parent element. Any `.control-label`, `.form-control`, and `.help-block` within that element will receive the validation styles.
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-form-validation-state-accessibility">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-form-validation-state-accessibility">
|
||||
<h4>Conveying validation state to assistive technologies and colorblind users</h4>
|
||||
<p>Using these validation styles to denote the state of a form control only provides a visual, color-based indication, which will not be conveyed to users of assistive technologies - such as screen readers - or to colorblind users.</p>
|
||||
<p>Ensure that an alternative indication of state is also provided. For instance, you can include a hint about state in the form control's <code><label></code> text itself (as is the case in the following code example), include a <a href="../components/#glyphicons">Glyphicon</a> (with appropriate alternative text using the <code>.sr-only</code> class - see the <a href="../components/#glyphicons-examples">Glyphicon examples</a>), or by providing an additional <a href="#forms-help-text">help text</a> block. Specifically for assistive technologies, invalid form controls can also be assigned an <code>aria-invalid="true"</code> attribute.</p>
|
||||
|
@ -436,7 +436,7 @@ Bootstrap includes validation styles for error, warning, and success states on f
|
|||
|
||||
You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Icons, labels, and input groups</h4>
|
||||
<p>Manual positioning of feedback icons is required for inputs without a label and for <a href="../components#input-groups">input groups</a> with an add-on on the right. You are strongly encouraged to provide labels for all inputs for accessibility reasons. If you wish to prevent labels from being displayed, hide them with the `sr-only` class. If you must do without labels, adjust the `top` value of the feedback icon. For input groups, adjust the `right` value to an appropriate pixel value depending on the width of your addon.</p>
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@ Opt your images into responsive behavior (so they never become larger than their
|
|||
|
||||
Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element.
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<img data-src="holder.js/100%x250" class="img-responsive" alt="Generic responsive image">
|
||||
</div>
|
||||
|
||||
|
@ -17,7 +17,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
|
|||
<img src="..." class="img-responsive" alt="Responsive image">
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>SVG images and IE 9-10</h4>
|
||||
<p>In Internet Explorer 9-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@ Images in Bootstrap are responsive by default. `max-width: 100%;` and `height: a
|
|||
|
||||
Add classes to an `<img>` element to easily style images in any project.
|
||||
|
||||
<div class="bs-example bs-example-images">
|
||||
<div class="bd-example bd-example-images">
|
||||
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
|
||||
<img data-src="holder.js/200x200" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
|
||||
<img data-src="holder.js/200x200" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
|
||||
|
@ -42,7 +42,7 @@ Add classes to an `<img>` element to easily style images in any project.
|
|||
|
||||
Align images with the [helper float classes](/components/helpers) or [text alignment classes](/components/helpers). A simple centering class can also be used for `block` level images.
|
||||
|
||||
<div class="bs-example bs-example-images">
|
||||
<div class="bd-example bd-example-images">
|
||||
<img data-src="holder.js/200x200" class="img-rounded pull-left" alt="A generic square placeholder image with rounded corners">
|
||||
<img data-src="holder.js/200x200" class="img-rounded pull-right" alt="A generic square placeholder image with rounded corners">
|
||||
</div>
|
||||
|
@ -52,7 +52,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
|
|||
<img src="..." class="img-rounded pull-right" alt="...">
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-example bs-example-images">
|
||||
<div class="bd-example bd-example-images">
|
||||
<img data-src="holder.js/200x200" class="img-rounded center-block" style="display: block;" alt="A generic square placeholder image with rounded corners">
|
||||
</div>
|
||||
|
||||
|
@ -60,7 +60,7 @@ Align images with the [helper float classes](/components/helpers) or [text align
|
|||
<img src="..." class="img-rounded center-block" style="display: block;" alt="...">
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="bs-example bs-example-images">
|
||||
<div class="bd-example bd-example-images">
|
||||
<div class="text-center">
|
||||
<img data-src="holder.js/200x200" class="img-rounded" alt="A generic square placeholder image with rounded corners">
|
||||
</div>
|
||||
|
|
|
@ -342,7 +342,7 @@ Use contextual classes to color table rows or individual cells.
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -433,12 +433,12 @@ Use contextual classes to color table rows or individual cells.
|
|||
|
||||
Create responsive tables by wrapping any `.table` in `.table-responsive` to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tables-responsive-overflow">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-tables-responsive-overflow">
|
||||
<h4>Vertical clipping/truncation</h4>
|
||||
<p>Responsive tables make use of <code>overflow-y: hidden</code>, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Firefox and fieldsets</h4>
|
||||
<p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p>
|
||||
{% highlight css %}
|
||||
|
@ -449,7 +449,7 @@ Create responsive tables by wrapping any `.table` in `.table-responsive` to make
|
|||
<p>For more information, read <a href="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p>
|
||||
</div>
|
||||
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
|
|
@ -20,7 +20,7 @@ These styles can be found within `scaffolding.less`.
|
|||
|
||||
All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline.
|
||||
|
||||
<div class="bs-example bs-example-type">
|
||||
<div class="bd-example bd-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -62,7 +62,7 @@ All HTML headings, `<h1>` through `<h6>`, are available. `.h1` through `.h6` cla
|
|||
|
||||
Create lighter, secondary text in any heading with a generic `<small>` tag or the `.small` class.
|
||||
|
||||
<div class="bs-example bs-example-type">
|
||||
<div class="bd-example bd-example-type">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
@ -131,7 +131,7 @@ Styling for common inline HTML5 elements.
|
|||
<p><em>This line rendered as italicized text.</em></p>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Alternate elements</h4>
|
||||
<p>Feel free to use <code><b></code> and <code><i></code> in HTML5. <code><b></code> is meant to highlight words or phrases without conveying additional importance while <code><i></code> is mostly for voice, technical terms, etc.</p>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@ title: Examples
|
|||
|
||||
Examples that focus on implementing uses of built-in components provided by Bootstrap.
|
||||
|
||||
<div class="row bs-examples">
|
||||
<div class="row bd-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a href="{{ site.baseurl }}examples/starter-template/">
|
||||
<img class="img-thumbnail" src="{{ site.baseurl }}examples/screenshots/starter-template.jpg" alt="">
|
||||
|
@ -44,7 +44,7 @@ Examples that focus on implementing uses of built-in components provided by Boot
|
|||
|
||||
Taking the default navbar component and showing how it can be moved, placed, and extended.
|
||||
|
||||
<div class="row bs-examples">
|
||||
<div class="row bd-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a href="{{ site.baseurl }}examples/navbar/">
|
||||
<img class="img-thumbnail" src="{{ site.baseurl }}examples/screenshots/navbar.jpg" alt="">
|
||||
|
@ -74,7 +74,7 @@ Taking the default navbar component and showing how it can be moved, placed, and
|
|||
|
||||
Brand new components and templates to help folks quickly get started with Bootstrap and demonstrate best practices for adding onto the framework.
|
||||
|
||||
<div class="row bs-examples">
|
||||
<div class="row bd-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a href="{{ site.baseurl }}examples/cover/">
|
||||
<img class="img-thumbnail" src="{{ site.baseurl }}examples/screenshots/cover.jpg" alt="">
|
||||
|
@ -143,7 +143,7 @@ Brand new components and templates to help folks quickly get started with Bootst
|
|||
|
||||
Examples that focus on future-friendly features or techniques.
|
||||
|
||||
<div class="row bs-examples">
|
||||
<div class="row bd-examples">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<a href="{{ site.baseurl }}examples/offcanvas/">
|
||||
<img class="img-thumbnail" src="{{ site.baseurl }}examples/screenshots/offcanvas.jpg" alt="">
|
||||
|
|
|
@ -9,7 +9,7 @@ Bootstrap follows common web standards and—with minimal extra effort—can be
|
|||
|
||||
If your navigation contains many links and comes before the main content in the DOM, add a `Skip to main content` link before the navigation (for a simple explanation, see this [A11Y Project article on skip navigation links](http://a11yproject.com/posts/skip-nav-links/)). Using the `.sr-only` class will visually hide the skip link, and the <code>.sr-only-focusable</code> class will ensure that the link becomes visible once focused (for sighted keyboard users).
|
||||
|
||||
<div class="bs-callout bs-callout-danger" id="callout-skiplinks">
|
||||
<div class="bd-callout bd-callout-danger" id="callout-skiplinks">
|
||||
<p>Due to long-standing shortcomings/bugs in Chrome (see <a href="https://code.google.com/p/chromium/issues/detail?id=262171" title="Chromium bug tracker - Issue 262171: Focus should cycle from named anchor">issue 262171 in the Chromium bug tracker</a>) and Internet Explorer (see this article on <a href="http://accessibleculture.org/articles/2010/05/in-page-links/">in-page links and focus order</a>), you will need to make sure that the target of your skip link is at least programmatically focusable by adding <code>tabindex="-1"</code>.</p>
|
||||
<p>In addition, you may want to explicitly suppress a visible focus indication on the target (particularly as Chrome currently also sets focus on elements with <code>tabindex="-1"</code> when they are clicked with the mouse) with <code>#content:focus { outline: none; }</code>.</p>
|
||||
<p>Note that this bug will also affect any other in-page links your site may be using, rendering them useless for keyboard users. You may consider adding a similar stop-gap fix to all other named anchors / fragment identifiers that act as link targets.</p>
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Contents
|
|||
|
||||
Bootstrap can come in one of two forms, as precompiled or source code. Learn more about each form's contents and structure below.
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="jquery-required">
|
||||
<div class="bd-callout bd-callout-warning" id="jquery-required">
|
||||
<h4>jQuery required</h4>
|
||||
<p>Please note that <strong>all JavaScript plugins require jQuery</strong> to be included, as shown in the <a href="../quick-start">starter template</a>. <a href="{{ site.repo }}/blob/v{{ site.current_version }}/bower.json">Consult our <code>bower.json</code></a> to see which versions of jQuery are supported.</p>
|
||||
</div>
|
||||
|
|
|
@ -87,7 +87,7 @@ $.fn.tooltip.Constructor.VERSION // => "{{ site.current_version }}"
|
|||
|
||||
Bootstrap's plugins don't fall back particularly gracefully when JavaScript is disabled. If you care about the user experience in this case, use [`<noscript>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript) to explain the situation (and how to re-enable JavaScript) to your users, and/or add your own custom fallbacks.
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-third-party-libs">
|
||||
<div class="bd-callout bd-callout-warning" id="callout-third-party-libs">
|
||||
<h4>Third-party libraries</h4>
|
||||
<p><strong>Bootstrap does not officially support third-party JavaScript libraries</strong> like Prototype or jQuery UI. Despite <code>.noConflict</code> and namespaced events, there may be compatibility problems that you need to fix on your own.</p>
|
||||
</div>
|
||||
|
|
|
@ -3,11 +3,11 @@ layout: home
|
|||
title: Bootstrap · The world's most popular mobile-first and responsive front-end framework.
|
||||
---
|
||||
|
||||
<main class="bs-docs-masthead" id="content" role="main" tabindex="-1">
|
||||
<main class="bd-masthead" id="content" role="main" tabindex="-1">
|
||||
<div class="container">
|
||||
{% include nav-home.html %}
|
||||
|
||||
<span class="bs-docs-booticon outline">B</span>
|
||||
<span class="bd-booticon outline">B</span>
|
||||
<p class="lead">Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.</p>
|
||||
<p class="lead">
|
||||
<a href="getting-started#download" class="btn btn-outline-inverse btn-lg" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}');">Download Bootstrap</a>
|
||||
|
@ -17,9 +17,9 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
|
|||
</div>
|
||||
</main>
|
||||
|
||||
<div class="bs-docs-featurette hidden">
|
||||
<div class="bd-featurette hidden">
|
||||
<div class="container">
|
||||
<h2 class="bs-docs-featurette-title">Designed for everyone, everywhere.</h2>
|
||||
<h2 class="bd-featurette-title">Designed for everyone, everywhere.</h2>
|
||||
<p class="lead">Bootstrap makes front-end web development faster and easier. It's made for folks of all skill levels, devices of all shapes, and projects of all sizes.</p>
|
||||
|
||||
<hr class="half-rule">
|
||||
|
@ -49,14 +49,14 @@ title: Bootstrap · The world's most popular mobile-first and responsive f
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-docs-featurette hidden">
|
||||
<div class="bd-featurette hidden">
|
||||
<div class="container">
|
||||
<h2 class="bs-docs-featurette-title">Built with Bootstrap.</h2>
|
||||
<h2 class="bd-featurette-title">Built with Bootstrap.</h2>
|
||||
<p class="lead">Millions of amazing sites across the web are being built with Bootstrap. Get started on your own with our growing <a href="../getting-started/#examples">collection of examples</a> or by exploring some of our favorites.</p>
|
||||
|
||||
<hr class="half-rule">
|
||||
|
||||
<div class="row bs-docs-featured-sites">
|
||||
<div class="row bd-featured-sites">
|
||||
{% for showcase in site.data.showcase %}
|
||||
<div class="col-xs-6 col-sm-3">
|
||||
<a href="{{ showcase.expo_url }}" target="_blank" title="{{ showcase.name }}">
|
||||
|
|
|
@ -6,7 +6,7 @@ title: Buttons
|
|||
|
||||
Do more with buttons. Control button states or create groups of buttons for more components like toolbars.
|
||||
|
||||
<div class="bs-callout bs-callout-danger">
|
||||
<div class="bd-callout bd-callout-danger">
|
||||
<h4>Cross-browser compatibility</h4>
|
||||
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a>.</p>
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@ Do more with buttons. Control button states or create groups of buttons for more
|
|||
|
||||
Add `data-loading-text="Loading..."` to use a loading state on a button.
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Use whichever state you like!</h4>
|
||||
<p>For the sake of this demonstration, we are using <code>data-loading-text</code> and <code>$().button('loading')</code>, but that's not the only state you can use. <a href="#buttons-methods">See more on this below in the <code>$().button(string)</code> documentation</a>.</p>
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@ Add `data-toggle="button"` to activate toggling on a single button.
|
|||
</button>
|
||||
{% endexample %}
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Pre-toggled buttons need <code>.active</code> and <code>aria-pressed="true"</code></h4>
|
||||
<p>For pre-toggled buttons, you must add the <code>.active</code> class and the <code>aria-pressed="true"</code> attribute to the <code>button</code> yourself.</p>
|
||||
</div>
|
||||
|
@ -52,17 +52,17 @@ Add `data-toggle="button"` to activate toggling on a single button.
|
|||
|
||||
Add `data-toggle="buttons"` to a `.btn-group` containing checkbox or radio inputs to enable toggling in their respective styles.
|
||||
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Preselected options need <code>.active</code></h4>
|
||||
<p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
<div class="bs-callout bs-callout-warning">
|
||||
<div class="bd-callout bd-callout-warning">
|
||||
<h4>Visual checked state only updated on click</h4>
|
||||
<p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code><input type="reset"></code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
|
||||
</div>
|
||||
|
||||
{% example html %}
|
||||
<div class="bs-example">
|
||||
<div class="bd-example">
|
||||
<div class="btn-group" data-toggle="buttons">
|
||||
<label class="btn btn-primary active">
|
||||
<input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked)
|
||||
|
|
|
@ -7,7 +7,7 @@ title: Tabs
|
|||
|
||||
Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.
|
||||
|
||||
<div class="bs-example bs-example-tabs" role="tabpanel">
|
||||
<div class="bd-example bd-example-tabs" role="tabpanel">
|
||||
<ul id="myTab" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#home" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">Home</a>
|
||||
|
@ -42,7 +42,7 @@ Add quick, dynamic tab functionality to transition through panes of local conten
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bs-callout bs-callout-info">
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h4>Extends tabbed navigation</h4>
|
||||
<p>This plugin extends the <a href="../components/#nav-tabs">tabbed navigation component</a> to add tabbable areas.</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue