var testSubtasks = [];
// Skip core tests if running a different subset of the test suite
if (runSubset('core')) {
- testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit', 'docs']);
- testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'csslint:dist', 'test-js', 'docs']);
++ testSubtasks = testSubtasks.concat(['dist-css', 'dist-js', 'test-js', 'docs']);
}
// Skip HTML validation if running a different subset of the test suite
if (runSubset('validate-html') &&
testSubtasks.push('saucelabs-qunit');
}
grunt.registerTask('test', testSubtasks);
+ grunt.registerTask('test-js', ['jshint:core', 'jshint:test', 'jshint:grunt', 'jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']);
// JS distribution task.
- grunt.registerTask('dist-js', ['concat', 'uglify:core']);
+ grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']);
// CSS distribution task.
- grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
- grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'usebanner', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);
+ grunt.registerTask('less-compile', ['less:compileCore']);
+ grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'usebanner', 'csscomb:dist', 'cssmin:core']);
// Full distribution task.
- grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']);
+ grunt.registerTask('dist', ['clean:dist', 'dist-css', 'dist-js']);
// Default task.
- grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'test']);
+ grunt.registerTask('default', ['clean:dist', 'test']);
// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
generateRawFiles(grunt, banner);
});
+ grunt.registerTask('commonjs', 'Generate CommonJS entrypoint module in dist dir.', function () {
+ var srcFiles = grunt.config.get('concat.bootstrap.src');
+ var destFilepath = 'dist/js/npm.js';
+ generateCommonJSModule(grunt, srcFiles, destFilepath);
+ });
+
// Docs task.
grunt.registerTask('docs-css', ['autoprefixer:docs', 'autoprefixer:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
- grunt.registerTask('lint-docs-css', ['csslint:docs', 'csslint:examples']);
grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']);
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
- grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-customizer']);
+ grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-customizer']);
// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
--- /dev/null
- <td><a href="{{ site.bug.firefox }}1023761">Mozilla bug #1023761</a></td>
- <td><a href="{{ site.bug.github }}13453">#13453</a></td>
- </tr>
- <tr>
- <td>Firefox</td>
- <td>Unusual default form control styles on Android</td>
- <td><a href="{{ site.bug.firefox }}900871">Closed Mozilla bug #900871</a>, <a href="{{ site.bug.firefox }}763671">Open Mozilla bug #763671</a></td>
- <td><a href="{{ site.bug.github }}8702">#8702</a></td>
+---
+layout: default
+title: Wall of browser bugs
+---
+
+Bootstrap currently works around several outstanding browser bugs in major browsers to deliver the best cross-browser experience possible. Some bugs, like those listed below, cannot be solved by us.
+
+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="table table-bordered table-hover">
+ <thead>
+ <tr>
+ <th>Browser(s)</th>
+ <th>Summary of bug</th>
+ <th>Upstream bug(s)</th>
+ <th>Bootstrap issue(s)</th>
+ </tr>
+ </thead>
+ <tbody>
++ <tr>
++ <td>Internet Explorer 11</td>
++ <td>Hovered element still remains in <code>:hover</code> state after scrolling away</td>
++ <td><a href="https://connect.microsoft.com/IE/feedback/details/926665/ie-11-hovering-over-an-element-and-then-scrolling-without-moving-the-mouse-pointer-leaves-the-element-in-hover-state">IE bug #926665</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/14211">#14211</a></td>
++ </tr>
+ <tr>
+ <td>Internet Explorer 11</td>
+ <td>When hovering over a <code><select></code> menu item, the cursor for the element underneath the menu is displayed</td>
+ <td><a href="https://connect.microsoft.com/IE/feedbackdetail/view/963961">IE bug #963961</a></td>
+ <td><a href="https://github.com/twbs/bootstrap/issues/14528">#14528</a></td>
+ </tr>
+ <tr>
+ <td>Firefox</td>
+ <td><code>.table-bordered</code> with an empty <code><tbody></code> is missing borders</td>
- <td><a href="{{ site.bug.firefox }}975632">Mozilla bug #975632</a></td>
- <td><a href="{{ site.bug.github }}10690">#10690</a></td>
++ <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1023761">Mozilla bug #1023761</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/13453">#13453</a></td>
+ </tr>
+ <tr>
+ <td>Firefox</td>
+ <td><code>max-width: 100%;</code> doesn't work inside tables</td>
- <tr>
- <td>Firefox</td>
- <td>If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.</td>
- <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a></td>
- <td><a href="https://github.com/twbs/bootstrap/issues/793">#793</a></td>
- </tr>
++ <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=975632">Mozilla bug #975632</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/10690">#10690</a></td>
+ </tr>
+ <tr>
+ <td>Firefox</td>
+ <td>Java applets that are descendants of elements with forced hardware acceleration using <code>translate3d(0,0,0)</code> are invisible on Windows</td>
+ <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1048279">Mozilla bug #1048279</a></td>
+ <td><a href="https://github.com/twbs/bootstrap/issues/14124">#14124</a></td>
+ </tr>
- <td>Chrome</td>
- <td>Weird button behavior with some number <code><input></code>s</td>
- <td><a href="{{ site.bug.chrome }}337668">Chromium issue #337668</a></td>
- <td><a href="{{ site.bug.github }}8350">#8350</a>, <a href="https://github.com/necolas/normalize.css/issues/283">Normalize #283</a></td>
- </tr>
- <tr>
- <td>Chrome</td>
- <td><code>display: table;</code> within <code>display: block;</code> forces sibling content to new line</td>
- <td><a href="{{ site.bug.chrome }}309483">Chromium issue #309483</a></td>
- <td><a href="{{ site.bug.github }}9950">#9950</a></td>
+ <tr>
+ <td>Firefox</td>
+ <td>Button elements with <code>width: 100%</code> become cropped in long tables.</td>
+ <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1060131">Mozilla bug #1060131</a></td>
+ <td><a href="https://github.com/twbs/bootstrap/issues/14320">#14320</a></td>
+ </tr>
+ <tr>
- <td>Unwanted vertical lines when printing styled <code><select></code> on OS X</td>
- <td><a href="{{ site.bug.chrome }}282918">Chromium issue #282918</a></td>
- <td><a href="{{ site.bug.github }}11245">#11245</a></td>
++ <td>Firefox</td>
++ <td>If the disabled state of a form control is changed via JavaScript, the normal state doesn't return after refreshing the page.</td>
++ <td><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">Mozilla bug #654072</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/793">#793</a></td>
+ </tr>
+ <tr>
+ <td>Chrome</td>
- <td>inline-block element collapses white-space on Windows</td>
- <td><a href="{{ site.bug.chrome }}329574">Chromium issue #329574</a></td>
- <td><a href="{{ site.bug.github }}11885">#11885</a></td>
++ <td>Clicking above <code><input type="number"></code> increment button flashes the decrement button</td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=419108"></a></td>
++ <td>Offshoot of <a href="https://github.com/twbs/bootstrap/issues/8350">#8350</a> & <a href="https://code.google.com/p/chromium/issues/detail?id=337668">Chromium issue #337668</a></td>
+ </tr>
+ <tr>
+ <td>Chrome</td>
- <td><a href="{{ site.bug.chrome }}273306">Chromium issue #273306</a></td>
- <td><a href="{{ site.bug.github }}12078">#12078</a></td>
++ <td><code>display: table;</code> within <code>display: block;</code> forces sibling content to new line</td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=309483">Chromium issue #309483</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/9950">#9950</a></td>
+ </tr>
+ <tr>
+ <td>Chrome</td>
+ <td>Incorrect viewport size used for media queries when printing</td>
- <td><a href="{{ site.bug.chrome }}342208">Chromium issue #342208</a>, <a href="{{ site.bug.webkit }}128489">WebKit bug #128489</a></td>
- <td><a href="{{ site.bug.github }}12536">#12536</a></td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=273306">Chromium issue #273306</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/12078">#12078</a></td>
+ </tr>
+ <tr>
+ <td>Chrome & Safari</td>
+ <td>OS X scrollbar clipped in <code>select[multiple]</code> with padding</td>
- <td><a href="{{ site.bug.chrome }}346051">Chromium issue #346051</a></td>
- <td><a href="{{ site.bug.github }}12548">#12548</a></td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=342208">Chromium issue #342208</a>, <a href="https://bugs.webkit.org/show_bug.cgi?id=128489">WebKit bug #128489</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/12536">#12536</a></td>
+ </tr>
+ <tr>
+ <td>Chrome</td>
+ <td><code>display: table-cell; width: 100%;</code> doesn't work correctly on date <code><input></code></td>
- <td><a href="{{ site.bug.chrome }}377346">Chrome issue #377346</a></td>
- <td><a href="{{ site.bug.github }}13892">#13892</a></td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=346051">Chromium issue #346051</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/12548">#12548</a></td>
+ </tr>
+ <tr>
+ <td>Chrome</td>
+ <td><code><input type="password"></code> sporadically causes bad widths on floated elements</td>
- <td>Insufficient CSS percentage precision</td>
- <td>(No public bug tracker)</td>
- <td><a href="{{ site.bug.github }}9282">#9282</a></td>
++ <td><a href="https://code.google.com/p/chromium/issues/detail?id=377346">Chrome issue #377346</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/13892">#13892</a></td>
+ </tr>
+ <tr>
+ <td>Safari</td>
- <td><a href="{{ site.bug.github }}9774">#9774</a></td>
++ <td>Weird button behavior with some number <code><input></code>s</td>
++ <td><a href="https://bugs.webkit.org/show_bug.cgi?id=137269">WebKit bug #137269</a></td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/8350">#8350</a>, <a href="https://github.com/necolas/normalize.css/issues/283">Normalize #283</a>, <a href="https://code.google.com/p/chromium/issues/detail?id=337668">Chromium issue #337668</a></td>
+ </tr>
+ <tr>
+ <td>Safari</td>
+ <td>Justified nav rendering bug</td>
+ <td>(No public bug tracker)</td>
++ <td><a href="https://github.com/twbs/bootstrap/issues/9774">#9774</a></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
--- /dev/null
- #### Inline checkboxes and radios
+---
+layout: page
+title: Forms
+---
+
+Bootstrap normalizes common HTML5 form elements and adds a number of layout options for building forms of all sizes.
+
+## Example form
+
+Individual form controls automatically receive some global styling. All textual `<input>`, `<textarea>`, and `<select>` elements with `.form-control` are set to `width: 100%;` by default. Wrap labels and controls in `.form-group` for optimum spacing.
+
+{% example html %}
+<form role="form">
+ <div class="form-group">
+ <label for="exampleInputEmail1">Email address</label>
+ <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
+ </div>
+ <div class="form-group">
+ <label for="exampleInputPassword1">Password</label>
+ <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
+ </div>
+ <div class="form-group">
+ <label for="exampleInputFile">File input</label>
+ <input type="file" id="exampleInputFile">
+ <p class="help-block">Example block-level help text here.</p>
+ </div>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Check me out
+ </label>
+ </div>
+ <button type="submit" class="btn btn-secondary">Submit</button>
+</form>
+{% endexample %}
+
+<div class="bs-callout bs-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>
+
+## Inline forms
+
+Add `.form-inline` to your `<form>` for left-aligned and inline-block controls. **This only applies to forms within viewports that are at least 768px wide.**
+
+<div class="bs-callout bs-callout-danger">
+ <h4>Requires 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">
+ <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>
+
+{% example html %}
+<form class="form-inline" role="form">
+ <div class="form-group">
+ <label class="sr-only" for="exampleInputEmail2">Email address</label>
+ <input type="email" class="form-control" id="exampleInputEmail2" placeholder="Enter email">
+ </div>
+ <div class="form-group">
+ <div class="input-group">
+ <div class="input-group-addon">@</div>
+ <input class="form-control" type="email" placeholder="Enter email">
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="sr-only" for="exampleInputPassword2">Password</label>
+ <input type="password" class="form-control" id="exampleInputPassword2" placeholder="Password">
+ </div>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Remember me
+ </label>
+ </div>
+ <button type="submit" class="btn btn-secondary">Sign in</button>
+</form>
+{% endexample %}
+
+## Horizontal forms
+
+Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding `.form-horizontal` to the form. Doing so changes `.form-group`s to behave as grid rows, so no need for `.row`.
+
+{% example html %}
+<form class="form-horizontal" role="form">
+ <div class="form-group">
+ <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
+ <div class="col-sm-10">
+ <input type="email" class="form-control" id="inputEmail3" placeholder="Email">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
+ <div class="col-sm-10">
+ <input type="password" class="form-control" id="inputPassword3" placeholder="Password">
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Remember me
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <button type="submit" class="btn btn-secondary">Sign in</button>
+ </div>
+ </div>
+</form>
+{% endexample %}
+
+## Supported controls
+
+Examples of standard form controls supported in an example form layout.
+
+### Inputs
+
+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">
+ <h4>Type declaration required</h4>
+ <p>Inputs will only be fully styled if their `type` is properly declared.</p>
+</div>
+
+{% example html %}
+<input type="text" class="form-control" placeholder="Text input">
+{% endexample %}
+
+<div class="bs-callout bs-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>
+
+### Textarea
+
+Form control which supports multiple lines of text. Change `rows` attribute as necessary.
+
+{% example html %}
+<textarea class="form-control" rows="3"></textarea>
+{% endexample %}
+
+### Checkboxes and radios
+
+Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.
+
+A checkbox or radio with the `disabled` attribute will be styled appropriately. To have the `<label>` for the checkbox or radio also display a "not-allowed" cursor when the user hovers over the label, add the `.disabled` class to your `.radio`, `.radio-inline`, `.checkbox`, `.checkbox-inline`, or `<fieldset>`.
+
+#### Default (stacked)
+
+{% example html %}
+<div class="checkbox">
+ <label>
+ <input type="checkbox" value="">
+ Option one is this and that—be sure to include why it's great
+ </label>
+</div>
+<div class="checkbox disabled">
+ <label>
+ <input type="checkbox" value="" disabled>
+ Option two is disabled
+ </label>
+</div>
+
+<div class="radio">
+ <label>
+ <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked>
+ Option one is this and that—be sure to include why it's great
+ </label>
+</div>
+<div class="radio">
+ <label>
+ <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">
+ Option two can be something else and selecting it will deselect option one
+ </label>
+</div>
+<div class="radio disabled">
+ <label>
+ <input type="radio" name="optionsRadios" id="optionsRadios3" value="option3" disabled>
+ Option three is disabled
+ </label>
+</div>
+{% endexample %}
+
- #### Selects
++#### Inline
+
+Use the `.checkbox-inline` or `.radio-inline` classes on a series of checkboxes or radios for controls that appear on the same line.
+
+{% example html %}
+<label class="checkbox-inline">
+ <input type="checkbox" id="inlineCheckbox1" value="option1"> 1
+</label>
+<label class="checkbox-inline">
+ <input type="checkbox" id="inlineCheckbox2" value="option2"> 2
+</label>
+<label class="checkbox-inline">
+ <input type="checkbox" id="inlineCheckbox3" value="option3"> 3
+</label>
+
+<label class="radio-inline">
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1"> 1
+</label>
+<label class="radio-inline">
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2"> 2
+</label>
+<label class="radio-inline">
+ <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3"> 3
+</label>
+{% endexample %}
+
++#### Without labels
++
++Should you have no text within the `<label>`, the input is positioned as you'd expect. **Currently only works on non-inline checkboxes and radios.**
++
++{% example html %}
++<div class="checkbox">
++ <label>
++ <input type="checkbox" id="blankCheckbox" value="option1">
++ </label>
++</div>
++<div class="radio">
++ <label>
++ <input type="radio" name="blankRadio" id="blankRadio1" value="option1">
++ </label>
++</div>
++{% endexample %}
++
++### Selects
+
+Use the default option, or add `multiple` to show multiple options at once.
+
+{% example html %}
+<select class="form-control">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option>
+</select>
+
+<select multiple class="form-control">
+ <option>1</option>
+ <option>2</option>
+ <option>3</option>
+ <option>4</option>
+ <option>5</option>
+</select>
+{% endexample %}
+
+## Static controls
+
+When you need to place plain text next to a form label within a form, use the `.form-control-static` class on a `<p>`.
+
+{% example html %}
+<form class="form-horizontal" role="form">
+ <div class="form-group">
+ <label class="col-sm-2 control-label">Email</label>
+ <div class="col-sm-10">
+ <p class="form-control-static">email@example.com</p>
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="inputPassword" class="col-sm-2 control-label">Password</label>
+ <div class="col-sm-10">
+ <input type="password" class="form-control" id="inputPassword" placeholder="Password">
+ </div>
+ </div>
+</form>
+{% endexample %}
+
+{% example html %}
+<form class="form-inline" role="form">
+ <div class="form-group">
+ <label class="sr-only">Email</label>
+ <p class="form-control-static">email@example.com</p>
+ </div>
+ <div class="form-group">
+ <label for="inputPassword2" class="sr-only">Password</label>
+ <input type="password" class="form-control" id="inputPassword2" placeholder="Password">
+ </div>
+ <button type="submit" class="btn btn-default">Confirm identity</button>
+</form>
+{% endexample %}
+
+## Focus state
+
+We remove the default `outline` styles on some form controls and apply a `box-shadow` in its place for `:focus`.
+
+<div class="bs-example">
+ <form role="form">
+ <input class="form-control" id="focusedInput" type="text" value="Demonstrative focus state">
+ </form>
+</div>
+
+<div class="bs-callout bs-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>
+
+## Disabled states
+
+Add the `disabled` boolean attribute on an `<input>`, `<select>`, or `<textarea>` to prevent user input and trigger a slightly different look.
+
+{% highlight html %}
+<input class="form-control" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
+{% endhighlight %}
+
+Add the `disabled` attribute to a `<fieldset>` to disable all the controls within.
+
+{% example html %}
+<form role="form">
+ <fieldset disabled>
+ <div class="form-group">
+ <label for="disabledTextInput">Disabled input</label>
+ <input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
+ </div>
+ <div class="form-group">
+ <label for="disabledSelect">Disabled select menu</label>
+ <select id="disabledSelect" class="form-control">
+ <option>Disabled select</option>
+ </select>
+ </div>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox"> Can't check this
+ </label>
+ </div>
+ <button type="submit" class="btn btn-primary">Submit</button>
+ </fieldset>
+</form>
+{% endexample %}
+
+<div class="bs-callout bs-callout-warning">
+ <h4>Caveat about link functionality of `<a>`</h4>
+ <p>Our styles use `pointer-events: none` to try to disable the link functionality of <code><a class="btn btn-*"></code> buttons in this case, but that CSS property is not yet standardized and isn't fully supported in Opera 18 and below, or in Internet Explorer 11. So to be safe, use custom JavaScript to disable such links.</p>
+</div>
+
+<div class="bs-callout bs-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>
+
+## Readonly inputs
+
+Add the `readonly` boolean attribute on an input to prevent user input and style the input as disabled.
+
+{% example html %}
+<input class="form-control" type="text" placeholder="Readonly input here…" readonly>
+{% endexample %}
+
+## Validation
+
+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.
+
+{% example html %}
+<div class="form-group has-success">
+ <label class="control-label" for="inputSuccess1">Input with success</label>
+ <input type="text" class="form-control" id="inputSuccess1">
+</div>
+<div class="form-group has-warning">
+ <label class="control-label" for="inputWarning1">Input with warning</label>
+ <input type="text" class="form-control" id="inputWarning1">
+</div>
+<div class="form-group has-error">
+ <label class="control-label" for="inputError1">Input with error</label>
+ <input type="text" class="form-control" id="inputError1">
+</div>
+<div class="has-success">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="checkboxSuccess" value="option1">
+ Checkbox with success
+ </label>
+ </div>
+</div>
+<div class="has-warning">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="checkboxWarning" value="option1">
+ Checkbox with warning
+ </label>
+ </div>
+</div>
+<div class="has-error">
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="checkboxError" value="option1">
+ Checkbox with error
+ </label>
+ </div>
+</div>
+{% endexample %}
+
+You can also add optional feedback icons with the addition of `.has-feedback` and the right icon.
+
+<div class="bs-callout bs-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>
+
+{% example html %}
+<div class="form-group has-success has-feedback">
+ <label class="control-label" for="inputSuccess2">Input with success</label>
+ <input type="text" class="form-control" id="inputSuccess2">
+ <span class="glyphicon glyphicon-ok form-control-feedback"></span>
+</div>
+<div class="form-group has-warning has-feedback">
+ <label class="control-label" for="inputWarning2">Input with warning</label>
+ <input type="text" class="form-control" id="inputWarning2">
+ <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
+</div>
+<div class="form-group has-error has-feedback">
+ <label class="control-label" for="inputError2">Input with error</label>
+ <input type="text" class="form-control" id="inputError2">
+ <span class="glyphicon glyphicon-remove form-control-feedback"></span>
+</div>
+{% endexample %}
+
+{% example html %}
+<form class="form-horizontal" role="form">
+ <div class="form-group has-success has-feedback">
+ <label class="control-label col-sm-3" for="inputSuccess3">Input with success</label>
+ <div class="col-sm-9">
+ <input type="text" class="form-control" id="inputSuccess3">
+ <span class="glyphicon glyphicon-ok form-control-feedback"></span>
+ </div>
+ </div>
+</form>
+{% endexample %}
+
+{% example html %}
+<form class="form-inline" role="form">
+ <div class="form-group has-success has-feedback">
+ <label class="control-label" for="inputSuccess4">Input with success</label>
+ <input type="text" class="form-control" id="inputSuccess4">
+ <span class="glyphicon glyphicon-ok form-control-feedback"></span>
+ </div>
+</form>
+{% endexample %}
+
+For form controls with no visible label, add the `.sr-only` class on the label. Bootstrap will automatically adjust the position of the icon once it's been added.
+
+{% example html %}
+<div class="form-group has-success has-feedback">
+ <label class="control-label sr-only" for="inputSuccess5">Hidden label</label>
+ <input type="text" class="form-control" id="inputSuccess5">
+ <span class="glyphicon glyphicon-ok form-control-feedback"></span>
+</div>
+{% endexample %}
+
+## Control sizing
+
+Set heights using classes like `.input-lg`, and set widths using grid column classes like `.col-lg-*`.
+
+{% example html %}
+<input class="form-control input-lg" type="text" placeholder=".input-lg">
+<input class="form-control" type="text" placeholder="Default input">
+<input class="form-control input-sm" type="text" placeholder=".input-sm">
+
+<select class="form-control input-lg"></select>
+<select class="form-control"></select>
+<select class="form-control input-sm"></select>
+{% endexample %}
+
+Quickly size labels and form controls within `.form-horizontal` by adding `.form-group-lg` or `.form-group-sm` to existing `.form-group`s.
+
+{% example html %}
+<form class="form-horizontal" role="form">
+ <div class="form-group form-group-lg">
+ <label class="col-sm-2 control-label" for="formGroupInputLarge">Large label</label>
+ <div class="col-sm-10">
+ <input class="form-control" type="text" id="formGroupInputLarge" placeholder="Large input">
+ </div>
+ </div>
+ <div class="form-group form-group-sm">
+ <label class="col-sm-2 control-label" for="formGroupInputSmall">Small label</label>
+ <div class="col-sm-10">
+ <input class="form-control" type="text" id="formGroupInputSmall" placeholder="Small input">
+ </div>
+ </div>
+</form>
+{% endexample %}
+
+## Column sizing
+
+Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.
+
+{% example html %}
+<div class="row">
+ <div class="col-xs-2">
+ <input type="text" class="form-control" placeholder=".col-xs-2">
+ </div>
+ <div class="col-xs-3">
+ <input type="text" class="form-control" placeholder=".col-xs-3">
+ </div>
+ <div class="col-xs-4">
+ <input type="text" class="form-control" placeholder=".col-xs-4">
+ </div>
+</div>
+{% endexample %}
+
+## Help text
+
+Block level help text for form controls.
+
+{% example html %}
+<p class="help-block">A block of help text that breaks onto a new line and may extend beyond one line.</p>
+{% endexample %}
-<div class="bs-docs-section">
- <h1 id="navbar" class="page-header">Navbar</h1>
-
- <h2 id="navbar-default">Default navbar</h2>
- <p>Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.</p>
- <p><strong class="text-danger">Justified navbar nav links are currently not supported.</strong></p>
-
- <div class="bs-callout bs-callout-warning" id="callout-navbar-overflow">
- <h4>Overflowing content</h4>
- <p>Since Bootstrap doesn't know how much space the content in your navbar needs, you might run into issues with content wrapping into a second row. To resolve this, you can:</p>
- <ol type="a">
- <li>Reduce the amount or width of navbar items.</li>
- <li>Hide certain navbar items at certain screen sizes using <a href="../css/#responsive-utilities">responsive utility classes</a>.</li>
- <li>Change the point at which your navbar switches between collapsed and horizontal mode. Customize the <code>@grid-float-breakpoint</code> variable or add your own media query.</li>
- </ol>
- </div>
- <div class="bs-callout bs-callout-danger">
- <h4>Requires JavaScript</h4>
- <p>If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the <code>.navbar-collapse</code>.</p>
- </div>
- <div class="bs-callout bs-callout-info">
- <h4>Changing the collapsed mobile navbar breakpoint</h4>
- <p>The navbar collapses into its vertical mobile view when the viewport is narrower than <code>@grid-float-breakpoint</code>, and expands into its horizontal non-mobile view when the viewport is at least <code>@grid-float-breakpoint</code> in width. Adjust this variable in the Less source to control when the navbar collapses/expands. The default value is <code>768px</code> (the smallest "small" or "tablet" screen).</p>
- </div>
+---
+layout: page
+title: Navbar
+---
- <div class="bs-example">
- <nav class="navbar navbar-default" role="navigation">
- <div class="container-fluid">
- <!-- Brand and toggle get grouped for better mobile display -->
- <div class="navbar-header">
- <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="#">Brand</a>
- </div>
+## Default navbar
+
+Navbars are responsive meta components that serve as navigation headers for your application or site. They begin collapsed (and are toggleable) in mobile views and become horizontal as the available viewport width increases.
+
++**Justified navbar nav links are currently not supported.**
++
+<div class="bs-callout bs-callout-warning" id="callout-navbar-overflow">
+ <h4>Overflowing content</h4>
+ <p>Since Bootstrap doesn't know how much space the content in your navbar needs, you might run into issues with content wrapping into a second row. To resolve this, you can:</p>
+ <ol type="a">
+ <li>Reduce the amount or width of navbar items.</li>
+ <li>Hide certain navbar items at certain screen sizes using <a href="../css/#responsive-utilities">responsive utility classes</a>.</li>
+ <li>Change the point at which your navbar switches between collapsed and horizontal mode. Customize the <code>@grid-float-breakpoint</code> variable or add your own media query.</li>
+ </ol>
+</div>
+<div class="bs-callout bs-callout-danger">
+ <h4>Requires JavaScript</h4>
+ <p>If JavaScript is disabled and the viewport is narrow enough that the navbar collapses, it will be impossible to expand the navbar and view the content within the <code>.navbar-collapse</code>.</p>
+</div>
+<div class="bs-callout bs-callout-info">
+ <h4>Changing the collapsed mobile navbar breakpoint</h4>
+ <p>The navbar collapses into its vertical mobile view when the viewport is narrower than <code>@grid-float-breakpoint</code>, and expands into its horizontal non-mobile view when the viewport is at least <code>@grid-float-breakpoint</code> in width. Adjust this variable in the Less source to control when the navbar collapses/expands. The default value is <code>768px</code> (the smallest "small" or "tablet" screen).</p>
+</div>
+
+<div class="bs-example">
+ <nav class="navbar navbar-default" role="navigation">
+ <div class="container-fluid">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#">Brand</a>
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li class="active"><a href="#">Link</a></li>
+ <li><a href="#">Link</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ <li class="divider"></li>
+ <li><a href="#">One more separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ <form class="navbar-form navbar-left" role="search">
+ <div class="form-group">
+ <input type="text" class="form-control" placeholder="Search">
+ </div>
+ <button type="submit" class="btn btn-secondary">Submit</button>
+ </form>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="#">Link</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
+ <ul class="dropdown-menu" role="menu">
+ <li><a href="#">Action</a></li>
+ <li><a href="#">Another action</a></li>
+ <li><a href="#">Something else here</a></li>
+ <li class="divider"></li>
+ <li><a href="#">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!-- /.navbar-collapse -->
+ </div><!-- /.container-fluid -->
+ </nav>
+</div>
- <!-- Collect the nav links, forms, and other content for toggling -->
- <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
- <ul class="nav navbar-nav">
- <li class="active"><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
- <ul class="dropdown-menu" role="menu">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a href="#">Separated link</a></li>
- <li class="divider"></li>
- <li><a href="#">One more separated link</a></li>
- </ul>
- </li>
- </ul>
- <form class="navbar-form navbar-left" role="search">
- <div class="form-group">
- <input type="text" class="form-control" placeholder="Search">
- </div>
- <button type="submit" class="btn btn-default">Submit</button>
- </form>
- <ul class="nav navbar-nav navbar-right">
- <li><a href="#">Link</a></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
- <ul class="dropdown-menu" role="menu">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li class="divider"></li>
- <li><a href="#">Separated link</a></li>
- </ul>
- </li>
- </ul>
- </div><!-- /.navbar-collapse -->
- </div><!-- /.container-fluid -->
- </nav>
- </div>
{% highlight html %}
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
--- /dev/null
- Rules are directly applied to `<iframe>`, `<embed>`, and `<object>` elements; optionally use an explicit descendant class `.embed-responsive-item` when you want to match the styling for other attributes.
+---
+layout: page
+title: Responsive embed
+---
+
+Allow browsers to determine video or slideshow dimensions based on the width of their containing block by creating an intrinsic ratio that will properly scale on any device.
+
- <iframe class="embed-responsive-item" src="…"></iframe>
++Rules are directly applied to `<iframe>`, `<embed>`, `<video>`, and `<object>` elements; optionally use an explicit descendant class `.embed-responsive-item` when you want to match the styling for other attributes.
+
+**Pro-Tip!** You don't need to include `frameborder="0"` in your `<iframe>`s as we override that for you.
+
+{% example html %}
+<div class="embed-responsive embed-responsive-16by9">
+ <iframe class="embed-responsive-item" src="//www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
+</div>
+{% endexample %}
+
+Aspect ratios can be customized. There are two available in Bootstrap, 16x9 and 4x3 (two of the most common for video).
+
+{% highlight html %}
+<!-- 16:9 aspect ratio -->
+<div class="embed-responsive embed-responsive-16by9">
- <iframe class="embed-responsive-item" src="…"></iframe>
++ <iframe class="embed-responsive-item" src="..."></iframe>
+</div>
+
+<!-- 4:3 aspect ratio -->
+<div class="embed-responsive embed-responsive-4by3">
++ <iframe class="embed-responsive-item" src="..."></iframe>
+</div>
+{% endhighlight %}
</div><!-- /.row -->
</div>
-
-
<div class="bs-docs-section" id="plugin-section">
- <button class="btn btn-default toggle" type="button">Toggle all</button>
+ <button class="btn btn-secondary toggle" type="button">Toggle all</button>
<h1 id="plugins" class="page-header">jQuery plugins</h1>
<p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files. Unsure what to include? Read the <a href="../javascript/">JavaScript</a> page in the docs.</p>
</div>
</div>
-
-
<div class="bs-docs-section" id="less-variables-section">
- <button class="btn btn-default toggle" type="button">Reset to defaults</button>
+ <button class="btn btn-secondary toggle" type="button">Reset to defaults</button>
<h1 id="less-variables" class="page-header">Less variables</h1>
<p class="lead">Customize Less variables to define colors, sizes and more inside your custom CSS stylesheets.</p>
--- /dev/null
- #### Tests and assets - `grunt docs`
- Compiles and tests CSS, JavaScript, and more for running the local documentation via `jekyll serve`.
+---
+layout: page
+title: Compiling with Grunt
+---
+
+Bootstrap uses [Grunt](http://gruntjs.com) for its build system, with convenient methods for working with the framework. It's how we compile our code, run tests, and more.
+
+### Install Grunt
+
+**To install Grunt, you must first [download and install node.js](http://nodejs.org/download/)** (which includes npm). npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js.
+
+From the command line:
+
+1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
+2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there.
+
+When completed, you'll be able to run the various Grunt commands provided from the command line.
+
+**Unfamiliar with npm? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.
+
+### Available Grunt commands
+
+#### Build - `grunt`
+Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
+
+#### Only compile CSS and JavaScript - `grunt dist`
+`grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
+
+#### Tests - `grunt test`
+Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
+
++#### Build and test docs assets - `grunt docs`
++Builds and tests CSS, JavaScript, and other assets which are used when running the documentation locally via `jekyll serve`.
+
+#### Watch - `grunt watch`
+This is a convenience method for watching just Less files and automatically building them whenever you save.
+
+### Troubleshooting dependencies
+
+Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
--- /dev/null
- As of Safari v7.0.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our `.col-*-1` grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here ([see #9282](https://github.com/twbs/bootstrap/issues/9282)) but you do have some options:
+---
+layout: page
+title: Browser and device support
+---
+
+Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.
+
+### Supported browsers
+
+Bootstrap supports the **latest, stable releases** of all major browsers and platforms. On Windows, **we support Internet Explorer 9-11**. More specific support information is provided below.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <td></td>
+ <th>Chrome</th>
+ <th>Firefox</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>Android</th>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-muted" rowspan="3" style="vertical-align: middle;">N/A</td>
+ <td class="text-danger">Not supported</td>
+ <td class="text-muted">N/A</td>
+ </tr>
+ <tr>
+ <th>iOS</th>
+ <td class="text-success">Supported</td>
+ <td class="text-muted">N/A</td>
+ <td class="text-danger">Not supported</td>
+ <td class="text-success">Supported</td>
+ </tr>
+ <tr>
+ <th>Mac OS X</th>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ </tr>
+ <tr>
+ <th>Windows</th>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-success">Supported</td>
+ <td class="text-danger">Not supported</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.
+
+For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs](../browser-bugs/).
+
+### Internet Explorer 9
+
+Internet Explorer 9 is also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th scope="col">Feature</th>
+ <th scope="col">Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th scope="row"><code>border-radius</code></th>
+ <td class="text-success">Supported</td>
+ </tr>
+ <tr>
+ <th scope="row"><code>box-shadow</code></th>
+ <td class="text-success">Supported</td>
+ </tr>
+ <tr>
+ <th scope="row"><code>transform</code></th>
+ <td class="text-success">Supported, with <code>-ms</code> prefix</td>
+ </tr>
+ <tr>
+ <th scope="row"><code>transition</code></th>
+ <td class="text-danger">Not supported</td>
+ </tr>
+ <tr>
+ <th scope="row"><code>placeholder</code></th>
+ <td class="text-danger">Not supported</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+Visit [Can I use...](http://caniuse.com/) for details on browser support of CSS3 and HTML5 features.
+
+### Supporting Internet Explorer 8
+
+As of v4, Bootstrap no longer supports IE8. **If you require IE8 support, we recommend you use Bootstrap 3.** It's still supported by our team for bugfixes and documentation changes, but no new features will be added to it.
+
+Alternatively, you can add the some third party JavaScript to backfill support for the browser. You'll need the following:
+
+* [The HTML5 shiv](http://en.wikipedia.org/wiki/HTML5_Shiv)
+* [Respond.js](https://github.com/scottjehl/Respond)
+* [Rem unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill)
+
+### IE Compatibility modes
+
+Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate `<meta>` tag in your pages:
+
+{% highlight html %}
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+{% endhighlight %}
+
+Confirm the document mode by opening the debugging tools: press <kbd>F12</kbd> and check the "Document Mode".
+
+This tag is included in all of Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer.
+
+See [this StackOverflow question](http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge) for more information.
+
+### Internet Explorer 10 in Windows 8 and Windows Phone 8
+
+Internet Explorer 10 doesn't differentiate **device width** from **viewport width**, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:
+
+{% highlight scss %}
+@-ms-viewport { width: device-width; }
+{% endhighlight %}
+
+However, this doesn't work for devices running Windows Phone 8 versions older than [Update 3 (a.k.a. GDR3)](http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/10/14/introducing-windows-phone-preview-for-developers.aspx), as it causes such devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to **include the following CSS and JavaScript to work around the bug**.
+
+{% highlight scss %}
+@-webkit-viewport { width: device-width; }
+@-moz-viewport { width: device-width; }
+@-ms-viewport { width: device-width; }
+@-o-viewport { width: device-width; }
+@viewport { width: device-width; }
+{% endhighlight %}
+
+{% highlight js %}
+if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
+ var msViewportStyle = document.createElement('style')
+ msViewportStyle.appendChild(
+ document.createTextNode(
+ '@-ms-viewport{width:auto!important}'
+ )
+ )
+ document.querySelector('head').appendChild(msViewportStyle)
+}
+{% endhighlight %}
+
+For more information and usage guidelines, read [Windows Phone 8 and Device-Width](http://timkadlec.com/2013/01/windows-phone-8-and-device-width/).
+
+As a heads up, we include this in all of Bootstrap's documentation and examples as a demonstration.
+
+### Safari percent rounding
+
++The rendering engine of versions of Safari prior to v7.1 for OS X and Safari for iOS v8.0 had some trouble with the number of decimal places used in our `.col-*-1` grid classes. So if you had 12 individual grid columns, you'd notice that they came up short compared to other rows of columns. Besides upgrading Safari/iOS, you have some options for workarounds:
+
+- Add `.pull-right` to your last grid column to get the hard-right alignment
+- Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)
+
+We'll keep an eye on this though and update our code if we have an easy solution.
+
+### Modals, navbars, and virtual keyboards
+
+#### Overflow and scrolling
+
+Support for `overflow: hidden;` on the `<body>` element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the `<body>` content will begin to scroll.
+
+#### Virtual keyboards
+
+Also, note that if you're using a fixed navbar or using inputs within a modal, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to `position: absolute;` or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.
+
+#### Navbar Dropdowns
+
+The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).
+
+### Browser zooming
+
+Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.
+
+### Printer viewports
+
+Even in some modern browsers, printing can be quirky. In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. <a href="https://github.com/twbs/bootstrap/issues/12078">See #12078 for some details.</a> Suggested workarounds:
+
+- Embrace the extra-small grid and make sure your page looks acceptable under it.
+- Customize the values of the `@screen-*` Less variables so that your printer paper is considered larger than extra-small.
+- Add custom media queries to change the grid size breakpoints for print media only.
+
+### Android stock browser
+
+Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.
+
+#### Select menu
+
+On `<select>` elements, the Android stock browser will not display the side controls if there is a `border-radius` and/or `border` applied. (See [this StackOverflow question](http://stackoverflow.com/questions/14744437/html-select-box-not-showing-drop-down-arrow-on-android-version-4-0-when-set-with) for details.) Use the snippet of code below to remove the offending CSS and render the `<select>` as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.
+
+{% highlight html %}
+<script>
+$(function () {
+ var nua = navigator.userAgent
+ var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
+ if (isAndroid) {
+ $('select.form-control').removeClass('form-control').css('width', '100%')
+ }
+})
+</script>
+{% endhighlight %}
+
+Want to see an example? [Check out this JS Bin demo.](http://jsbin.com/OyaqoDO/2)
+
+### Validators
+
+In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement.
+
+These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.
+
+Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of [X-UA-Compatible `<meta>` tags](#ie-compatibility-modes) to avoid Internet Explorer issues and our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072).
title: Bootstrap · The world's most popular mobile-first and responsive front-end framework.
---
+
<main class="bs-docs-masthead" id="content" role="main">
<div class="container">
- <span class="bs-docs-booticon bs-docs-booticon-lg bs-docs-booticon-outline">B</span>
+ <span class="bs-docs-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>
--- /dev/null
- <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>.</p>
+---
+layout: page
+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">
+ <h4>Cross-browser compatibility</h4>
- <button type="button" class="btn btn-primary" data-toggle="button" autocomplete="off">
++ <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>
+
+## Stateful
+
+Add `data-loading-text="Loading..."` to use a loading state on a button.
+
+<div class="bs-callout bs-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>
+
+{% example html %}
+<button type="button" id="myButton" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
+ Loading state
+</button>
+<script>
+ $('#myButton').on('click', function () {
+ var $btn = $(this).button('loading')
+ // business logic...
+ $btn.button('reset')
+ })
+</script>
+{% endexample %}
+
+### Single toggle
+
+Add `data-toggle="button"` to activate toggling on a single button.
+
+{% example html %}
++<button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off">
+ Single toggle
+</button>
+{% endexample %}
+
++<div class="bs-callout bs-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>
++
+## Checkbox and radio
+
+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">
+ <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">
+ <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="btn-group" data-toggle="buttons">
+ <label class="btn btn-primary active">
+ <input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked)
+ </label>
+ <label class="btn btn-primary">
+ <input type="checkbox" autocomplete="off"> Checkbox 2
+ </label>
+ <label class="btn btn-primary">
+ <input type="checkbox" autocomplete="off"> Checkbox 3
+ </label>
+ </div>
+</div>
+{% endexample %}
+
+{% example html %}
+<div class="btn-group" data-toggle="buttons">
+ <label class="btn btn-primary active">
+ <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
+ </label>
+ <label class="btn btn-primary">
+ <input type="radio" name="options" id="option2" autocomplete="off"> Radio 2
+ </label>
+ <label class="btn btn-primary">
+ <input type="radio" name="options" id="option3" autocomplete="off"> Radio 3
+ </label>
+</div>
+{% endexample %}
+
+### Methods
+
+#### $().button('toggle')
+
+Toggles push state. Gives the button the appearance that it has been activated.
+
+#### $().button('reset')
+
+Resets button state—swaps text to original text.
+
+#### $().button(string)
+
+Swaps text to any data defined text state.
+
+{% highlight html %}
+<button type="button" id="myStateButton" data-complete-text="finished!" class="btn btn-primary" autocomplete="off">
+ ...
+</button>
+<script>
+ $('#myStateButton').on('click', function () {
+ $(this).button('complete') // button text will be "finished!"
+ })
+</script>
+{% endhighlight %}
--- /dev/null
+---
+layout: page
+title: Carousel
+---
+
+A slideshow component for cycling through elements—images or slides of text—like a carousel. **Nested carousels are not supported.**
+
+## Example
+
+{% example html %}
+<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
+ <ol class="carousel-indicators">
+ <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
+ <li data-target="#carousel-example-generic" data-slide-to="1"></li>
+ <li data-target="#carousel-example-generic" data-slide-to="2"></li>
+ </ol>
+ <div class="carousel-inner" role="listbox">
+ <div class="item active">
+ <img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="First slide">
+ </div>
+ <div class="item">
+ <img data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt="Second slide">
+ </div>
+ <div class="item">
+ <img data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt="Third slide">
+ </div>
+ </div>
+ <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
+ <span class="glyphicon glyphicon-chevron-left"></span>
+ <span class="sr-only">Previous</span>
+ </a>
+ <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
+ <span class="glyphicon glyphicon-chevron-right"></span>
+ <span class="sr-only">Next</span>
+ </a>
+</div>
+{% endexample %}
+
+<div class="bs-callout bs-callout-warning" id="callout-carousel-transitions">
+ <h4>Transition animations not supported in Internet Explorer 8 & 9</h4>
+ <p>Bootstrap exclusively uses CSS3 for its animations, but Internet Explorer 8 & 9 don't support the necessary CSS properties. Thus, there are no slide transition animations when using these browsers. We have intentionally decided not to include jQuery-based fallbacks for the transitions.</p>
+</div>
+
+### Optional captions
+
+Add captions to your slides easily with the `.carousel-caption` element within any `.item`. Place just about any optional HTML within there and it will be automatically aligned and formatted.
+
+<div class="bs-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>
+ <li data-target="#carousel-example-captions" data-slide-to="1"></li>
+ <li data-target="#carousel-example-captions" data-slide-to="2"></li>
+ </ol>
+ <div class="carousel-inner" role="listbox">
+ <div class="item active">
+ <img data-src="holder.js/900x500/auto/#777:#777" alt="First slide image">
+ <div class="carousel-caption">
+ <h3>First slide label</h3>
+ <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
+ </div>
+ </div>
+ <div class="item">
+ <img data-src="holder.js/900x500/auto/#666:#666" alt="Second slide image">
+ <div class="carousel-caption">
+ <h3>Second slide label</h3>
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
+ </div>
+ </div>
+ <div class="item">
+ <img data-src="holder.js/900x500/auto/#555:#5555" alt="Third slide image">
+ <div class="carousel-caption">
+ <h3>Third slide label</h3>
+ <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
+ </div>
+ </div>
+ </div>
+ <a class="left carousel-control" href="#carousel-example-captions" role="button" data-slide="prev">
+ <span class="glyphicon glyphicon-chevron-left"></span>
+ <span class="sr-only">Previous</span>
+ </a>
+ <a class="right carousel-control" href="#carousel-example-captions" role="button" data-slide="next">
+ <span class="glyphicon glyphicon-chevron-right"></span>
+ <span class="sr-only">Next</span>
+ </a>
+ </div>
+</div>
+
+{% highlight html %}
+<div class="item">
+ <img src="..." alt="...">
+ <div class="carousel-caption">
+ <h3>...</h3>
+ <p>...</p>
+ </div>
+</div>
+{% endhighlight %}
+
+<div class="bs-callout bs-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>
+
+## Usage
+
+### Multiple carousels</h3>
+
+Carousels require the use of an `id` on the outermost container (the `.carousel`) for carousel controls to function properly. When adding multiple carousels, or when changing a carousel's `id`, be sure to update the relevant controls.
+
+### Via data attributes
+
+Use data attributes to easily control the position of the carousel. `data-slide` accepts the keywords `prev` or `next`, which alters the slide position relative to its current position. Alternatively, use `data-slide-to` to pass a raw slide index to the carousel `data-slide-to="2"`, which shifts the slide position to a particular index beginning with `0`.
+
+The `data-ride="carousel"` attribute is used to mark a carousel as animating starting at page load. **It cannot be used in combination with (redundant and unnecessary) explicit JavaScript initialization of the same carousel.**
+
+### Via JavaScript
+
+Call carousel manually with:
+
+{% highlight js %}
+$('.carousel').carousel()
+{% endhighlight %}
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-interval=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 50px;">type</th>
+ <th style="width: 50px;">default</th>
+ <th>description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>interval</td>
+ <td>number</td>
+ <td>5000</td>
+ <td>The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.</td>
+ </tr>
+ <tr>
+ <td>pause</td>
+ <td>string</td>
+ <td>"hover"</td>
+ <td>Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.</td>
+ </tr>
+ <tr>
+ <td>wrap</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Whether the carousel should cycle continuously or have hard stops.</td>
+ </tr>
++ <tr>
++ <td>keyboard</td>
++ <td>boolean</td>
++ <td>true</td>
++ <td>Whether the carousel should react to keyboard events.</td>
++ </tr>
+ </tbody>
+ </table>
+</div>
+
+### Methods
+
+#### .carousel(options)
+
+Initializes the carousel with an optional options `object` and starts cycling through items.
+
+{% highlight js %}
+$('.carousel').carousel({
+ interval: 2000
+})
+{% endhighlight %}
+
+#### .carousel('cycle')
+
+Cycles through the carousel items from left to right.
+
+#### .carousel('pause')
+
+Stops the carousel from cycling through items.
+
+#### .carousel(number)
+
+Cycles the carousel to a particular frame (0 based, similar to an array).
+
+#### .carousel('prev')
+
+Cycles to the previous item.
+
+#### .carousel('next')
+
+Cycles to the next item.
+
+### Events
+
+Bootstrap's carousel class exposes two events for hooking into carousel functionality. Both events have the following additional properties:
+
+- `direction`: The direction in which the carousel is sliding (either `"left"` or `"right"`).
+- `relatedTarget`: The DOM element that is being slid into place as the active item.
+
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>slide.bs.carousel</td>
+ <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
+ </tr>
+ <tr>
+ <td>slid.bs.carousel</td>
+ <td>This event is fired when the carousel has completed its slide transition.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myCarousel').on('slide.bs.carousel', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
- <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
+---
+layout: page
+title: Collapse
+---
+
+Get base styles and flexible support for collapsible components like accordions and navigation.
+
+<div class="bs-callout bs-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>
+
+## Example accordion
+
+Using the collapse plugin, we built a simple accordion by extending the panel component.
+
+{% example html %}
+<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingOne">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
+ Collapsible Group Item #1
+ </a>
+ </h4>
+ </div>
+ <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
+ <div class="panel-body">
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
+ </div>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingTwo">
+ <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
++ <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
+ Collapsible Group Item #2
+ </a>
+ </h4>
+ </div>
+ <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
+ <div class="panel-body">
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
+ </div>
+ </div>
+ </div>
+ <div class="panel panel-default">
+ <div class="panel-heading" role="tab" id="headingThree">
+ <h4 class="panel-title">
++ <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
+ Collapsible Group Item #3
+ </a>
+ </h4>
+ </div>
+ <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
+ <div class="panel-body">
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.
+ </div>
+ </div>
+ </div>
+</div>
+{% endexample %}
+
+You can also use the plugin without the accordion markup. Make a button toggle the expanding and collapsing of another element.
+
+<div class="bs-callout bs-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>
+</div>
+
+{% highlight html %}
+<button type="button" class="btn btn-danger" data-toggle="collapse" data-target="#demo">
+ simple collapsible
+</button>
+
+<div id="demo" class="collapse in">...</div>
+{% endhighlight %}
+
+
+## Usage
+
+The collapse plugin utilizes a few classes to handle the heavy lifting:
+
+- `.collapse` hides the content
+- `.collapse.in` shows the content
+- `.collapsing` is added when the transition starts, and removed when it finishes
+
+These classes can be found in `component-animations.less`.
+
+### Via data attributes
+
+Just add `data-toggle="collapse"` and a `data-target` to the element to automatically assign control of a collapsible element. The `data-target` attribute accepts a CSS selector to apply the collapse to. Be sure to add the class `collapse` to the collapsible element. If you'd like it to default open, add the additional class `in`.
+
+To add accordion-like group management to a collapsible control, add the data attribute `data-parent="#selector"`. Refer to the demo to see this in action.
+
+### Via JavaScript
+
+Enable manually with:
+
+{% highlight js %}
+$('.collapse').collapse()
+{% endhighlight %}
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-parent=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 50px;">type</th>
+ <th style="width: 50px;">default</th>
+ <th>description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>parent</td>
+ <td>selector</td>
+ <td>false</td>
+ <td>If a selector is provided, then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior - this is dependent on the <code>panel</code> class)</td>
+ </tr>
+ <tr>
+ <td>toggle</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Toggles the collapsible element on invocation</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+### Methods
+
+#### .collapse(options)
+
+Activates your content as a collapsible element. Accepts an optional options `object`.
+
+{% highlight js %}
+$('#myCollapsible').collapse({
+ toggle: false
+})
+{% endhighlight %}
+
+#### .collapse('toggle')
+
+Toggles a collapsible element to shown or hidden.
+
+#### .collapse('show')
+
+Shows a collapsible element.
+
+#### .collapse('hide')
+
+Hides a collapsible element.
+
+### Events
+
+Bootstrap's collapse class exposes a few events for hooking into collapse functionality.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>show.bs.collapse</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.collapse</td>
+ <td>This event is fired when a collapse element has been made visible to the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>hide.bs.collapse</td>
+ <td>
+ This event is fired immediately when the <code>hide</code> method has been called.
+ </td>
+ </tr>
+ <tr>
+ <td>hidden.bs.collapse</td>
+ <td>This event is fired when a collapse element has been hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myCollapsible').on('hidden.bs.collapse', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
+---
+layout: page
+title: Dropdowns
+---
+
+Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.
+
+### Within navbars
+
+<div class="bs-example">
+ <nav id="navbar-example" 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-collapse">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#">Project Name</a>
+ </div>
+ <div class="collapse navbar-collapse bs-example-js-navbar-collapse">
+ <ul class="nav navbar-nav">
+ <li class="dropdown">
+ <button id="drop1" type="button" class="dropdown-toggle" data-toggle="dropdown">
+ Dropdown
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <button id="drop2" type="button" class="dropdown-toggle" data-toggle="dropdown">
+ Dropdown 2
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li id="fat-menu" class="dropdown">
+ <button id="drop3" type="button" class="dropdown-toggle" data-toggle="dropdown">
+ Dropdown 3
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div><!-- /.nav-collapse -->
+ </div><!-- /.container-fluid -->
+ </nav> <!-- /navbar-example -->
+</div> <!-- /example -->
+
+### Within pills
+
+<div class="bs-example">
+ <ul class="nav nav-pills" role="tablist">
+ <li role="presentation" class="active"><a href="#">Regular link</a></li>
+ <li role="presentation" class="dropdown">
+ <button id="drop4" type="button" data-toggle="dropdown">
+ Dropdown
+ </button>
+ <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ <li role="presentation" class="dropdown">
+ <button id="drop5" type="button" data-toggle="dropdown">
+ Dropdown 2
+ </button>
+ <ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Another action</a></li>
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Something else here</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ <li role="presentation" class="dropdown">
+ <button id="drop6" type="button" data-toggle="dropdown">
+ Dropdown 3
+ </button>
+ <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop6">
- <li role="presentation"><a role="menuitem" tabindex="-1" href="http://twitter.com/fat">Separated link</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Another action</a></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Something else here</a></li>
+ <li role="presentation" class="divider"></li>
++ <li role="presentation"><a role="menuitem" tabindex="-1" href="https://twitter.com/fat">Separated link</a></li>
+ </ul>
+ </li>
+ </ul>
+</div>
+
+## Usage
+
+Via data attributes or JavaScript, the dropdown plugin toggles hidden content (dropdown menus) by toggling the `.open` class on the parent list item.
+
+On mobile devices, opening a dropdown adds a `.dropdown-backdrop` as a tap area for closing dropdown menus when tapping outside the menu, a requirement for proper iOS support. **This means that switching from an open dropdown menu to a different dropdown menu requires an extra tap on mobile.**
+
+Note: The `data-toggle="dropdown"` attribute is relied on for closing dropdown menus at an application level, so it's a good idea to always use it.
+
+### Via data attributes
+
+Add `data-toggle="dropdown"` to a link or button to toggle a dropdown.
+
+{% highlight html %}
+<div class="dropdown">
+ <button id="dLabel" type="button" data-toggle="dropdown">
+ Dropdown trigger
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+ ...
+ </ul>
+</div>
+{% endhighlight %}
+
+To keep URLs intact with link buttons, use the `data-target` attribute instead of `href="#"`.
+
+{% highlight html %}
+<div class="dropdown">
+ <a id="dLabel" data-target="#" href="http://example.com" data-toggle="dropdown">
+ Dropdown trigger
+ <span class="caret"></span>
+ </a>
+
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+ ...
+ </ul>
+</div>
+{% endhighlight %}
+
+### Via JavaScript
+
+Call the dropdowns via JavaScript:
+
+{% highlight js %}
+$('.dropdown-toggle').dropdown()
+{% endhighlight %}
+
+<div class="bs-callout bs-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>
+
+### Options
+
+*None.*
+
+### Methods
+
+#### $().dropdown('toggle')
+
+Toggles the dropdown menu of a given navbar or tabbed navigation.
+
+### Events
+
+All dropdown events are fired at the `.dropdown-menu`'s parent element.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>show.bs.dropdown</td>
+ <td>This event fires immediately when the show instance method is called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.dropdown</td>
+ <td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ <tr>
+ <td>hide.bs.dropdown</td>
+ <td>This event is fired immediately when the hide instance method has been called. The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.dropdown</td>
+ <td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete). The toggling anchor element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myDropdown').on('show.bs.dropdown', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
+---
+layout: page
+title: Modal
+---
+
+Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
+
++**Due to how HTML5 defines its semantics, the `autofocus` HTML attribute has no effect in Bootstrap modals.**
++
+<div class="bs-callout bs-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">
+ <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">
+ <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>
+
+### Static example
+
+A rendered modal with header, body, and set of actions in the footer.</p>
+
+<div class="bs-example bs-example-modal">
+ <div class="modal">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title">Modal title</h4>
+ </div>
+ <div class="modal-body">
+ <p>One fine body…</p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary">Save changes</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+</div>
+
+{% highlight html %}
+<div class="modal fade">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title">Modal title</h4>
+ </div>
+ <div class="modal-body">
+ <p>One fine body…</p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary">Save changes</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+</div><!-- /.modal -->
+{% endhighlight %}
+
+### Live demo
+
+Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.
+
+<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title" id="myModalLabel">Modal title</h4>
+ </div>
+ <div class="modal-body">
+ <h4>Text in a modal</h4>
+ <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
+
+ <h4>Popover in a modal</h4>
+ <p>This <a href="#" role="button" class="btn btn-secondary popover-test" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">button</a> should trigger a popover on click.</p>
+
+ <h4>Tooltips in a modal</h4>
+ <p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> should have tooltips on hover.</p>
+
+ <hr>
+
+ <h4>Overflowing text to show scroll behavior</h4>
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
+ <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
+ <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
+ <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
+ <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
+ <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
+ <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
+ <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary">Save changes</button>
+ </div>
+
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+</div>
+
+<div class="bs-example" style="padding-bottom: 24px;">
+ <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
+ Launch demo modal
+ </button>
+</div>
+
+{% highlight html %}
+<!-- Button trigger modal -->
+<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
+ Launch demo modal
+</button>
+
+<!-- Modal -->
+<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title" id="myModalLabel">Modal title</h4>
+ </div>
+ <div class="modal-body">
+ ...
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
+ <button type="button" class="btn btn-primary">Save changes</button>
+ </div>
+ </div>
+ </div>
+</div>
+{% endhighlight %}
+
+<div class="bs-callout bs-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">
+ <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>
+
+## Optional sizes
+
+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>
+
+{% highlight html %}
+<!-- Large modal -->
+<button class="btn btn-primary" data-toggle="modal" data-target=".bs-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-dialog modal-lg">
+ <div class="modal-content">
+ ...
+ </div>
+ </div>
+</div>
+
+<!-- Small modal -->
+<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-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-dialog modal-sm">
+ <div class="modal-content">
+ ...
+ </div>
+ </div>
+</div>
+{% endhighlight %}
+
+<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-lg">
+ <div class="modal-content">
+
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title" id="myLargeModalLabel">Large modal</h4>
+ </div>
+ <div class="modal-body">
+ ...
+ </div>
+ </div>
+ </div>
+</div>
+
+<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
+ <div class="modal-dialog modal-sm">
+ <div class="modal-content">
+
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
+ <h4 class="modal-title" id="mySmallModalLabel">Small modal</h4>
+ </div>
+ <div class="modal-body">
+ ...
+ </div>
+ </div>
+ </div>
+</div>
+
+## Remove animation
+
+For modals that simply appear rather than fade in to view, remove the `.fade` class from your modal markup.
+
+{% highlight html %}
+<div class="modal" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true">
+ ...
+</div>
+{% endhighlight %}
+
+## Usage
+
+The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds `.modal-open` to the `<body>` to override default scrolling behavior and generates a `.modal-backdrop` to provide a click area for dismissing shown modals when clicking outside the modal.
+
+### Via data attributes
+
+Activate a modal without writing JavaScript. Set `data-toggle="modal"` on a controller element, like a button, along with a `data-target="#foo"` or `href="#foo"` to target a specific modal to toggle.
+
+{% highlight html %}
+<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>
+{% endhighlight %}
+
+### Via JavaScript
+
+Call a modal with id `myModal` with a single line of JavaScript:
+
+{% highlight js %}$('#myModal').modal(options){% endhighlight %}
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-backdrop=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 50px;">type</th>
+ <th style="width: 50px;">default</th>
+ <th>description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>backdrop</td>
+ <td>boolean or the string <code>'static'</code></td>
+ <td>true</td>
+ <td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.</td>
+ </tr>
+ <tr>
+ <td>keyboard</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Closes the modal when escape key is pressed</td>
+ </tr>
+ <tr>
+ <td>show</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Shows the modal when initialized.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+### Methods
+
+#### .modal(options)
+
+Activates your content as a modal. Accepts an optional options `object`.
+
+{% highlight js %}
+$('#myModal').modal({
+ keyboard: false
+})
+{% endhighlight %}
+
+#### .modal('toggle')
+
+Manually toggles a modal. **Returns to the caller before the modal has actually been shown or hidden** (i.e. before the `shown.bs.modal` or `hidden.bs.modal` event occurs).
+
+{% highlight js %}$('#myModal').modal('toggle'){% endhighlight %}
+
+#### .modal('show')
+
+Manually opens a modal. **Returns to the caller before the modal has actually been shown** (i.e. before the `shown.bs.modal` event occurs).
+
+{% highlight js %}$('#myModal').modal('show'){% endhighlight %}
+
+#### .modal('hide')
+
+Manually hides a modal. **Returns to the caller before the modal has actually been hidden** (i.e. before the `hidden.bs.modal` event occurs).
+
+{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
+
+### Events
+
+Bootstrap's modal class exposes a few events for hooking into modal functionality.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>show.bs.modal</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called. If caused by a click, the clicked element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.modal</td>
+ <td>This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). If caused by a click, the clicked element is available as the <code>relatedTarget</code> property of the event.</td>
+ </tr>
+ <tr>
+ <td>hide.bs.modal</td>
+ <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.modal</td>
+ <td>This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>loaded.bs.modal</td>
+ <td>This event is fired when the modal has loaded content using the <code>remote</code> option.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myModal').on('hidden.bs.modal', function (e) {
+ // do something...
+})
+{% endhighlight %}
--- /dev/null
- <a href="#" tabindex="0" class="btn btn-lg btn-danger bs-docs-popover" 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>
+---
+layout: page
+title: Popovers
+---
+
+Add small overlays of content, like those on the iPad, to any element for housing secondary information.
+
+Popovers whose both title and content are zero-length are never displayed.
+
+<div class="bs-callout bs-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">
+ <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>
+</div>
+<div class="bs-callout bs-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">
+ <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">
+ <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">
+ <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>
+
+### Static popover
+
+Four options are available: top, right, bottom, and left aligned.
+
+<div class="bs-example bs-example-popover">
+ <div class="popover top">
+ <div class="arrow"></div>
+ <h3 class="popover-title">Popover top</h3>
+ <div class="popover-content">
+ <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
+ </div>
+ </div>
+
+ <div class="popover right">
+ <div class="arrow"></div>
+ <h3 class="popover-title">Popover right</h3>
+ <div class="popover-content">
+ <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
+ </div>
+ </div>
+
+ <div class="popover bottom">
+ <div class="arrow"></div>
+ <h3 class="popover-title">Popover bottom</h3>
+
+ <div class="popover-content">
+ <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
+ </div>
+ </div>
+
+ <div class="popover left">
+ <div class="arrow"></div>
+ <h3 class="popover-title">Popover left</h3>
+ <div class="popover-content">
+ <p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
+ </div>
+ </div>
+
+ <div class="clearfix"></div>
+</div>
+
+### 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>
+{% endexample %}
+
+#### Four directions
+
+<div class="bs-example popover-demo">
+ <div class="bs-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>
+ <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on top
+ </button>
+ <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on bottom
+ </button>
+ <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on right
+ </button>
+ </div>
+</div>
+
+{% highlight html %}
+<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>
+
+<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on top
+</button>
+
+<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus
+sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on bottom
+</button>
+
+<button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ Popover on right
+</button>
+{% endhighlight %}
+
+#### Dismiss on next click
+
+Use the `focus` trigger to dismiss popovers on the next click that the user makes.
+
+<div class="bs-callout bs-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 %}
- Reveals an elements popover.
++<a href="#" 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>
+{% endexample %}
+
+{% highlight js %}
+$('.popover-dismiss').popover({
+ trigger: 'focus'
+})
+{% endhighlight %}
+
+
+
+## Usage
+
+Enable popovers via JavaScript:
+
+{% highlight js %}$('#example').popover(options){% endhighlight %}
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 100px;">Type</th>
+ <th style="width: 50px;">Default</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>animation</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Apply a CSS fade transition to the popover</td>
+ </tr>
+ <tr>
+ <td>container</td>
+ <td>string | false</td>
+ <td>false</td>
+ <td>
+ <p>Appends the popover to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the popover in the flow of the document near the triggering element -Â which will prevent the popover from floating away from the triggering element during a window resize.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>content</td>
+ <td>string | function</td>
+ <td>''</td>
+ <td>
+ <p>Default content value if <code>data-content</code> attribute isn't present.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>delay</td>
+ <td>number | object</td>
+ <td>0</td>
+ <td>
+ <p>Delay showing and hiding the popover (ms) - does not apply to manual trigger type</p>
+ <p>If a number is supplied, delay is applied to both hide/show</p>
+ <p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>html</td>
+ <td>boolean</td>
+ <td>false</td>
+ <td>Insert HTML into the popover. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
+ </tr>
+ <tr>
+ <td>placement</td>
+ <td>string | function</td>
+ <td>'right'</td>
+ <td>
+ <p>How to position the popover - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the popover. For example, if placement is "auto left", the popover will display to the left when possible, otherwise it will display right.</p>
+ <p>When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the popover instance.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>selector</td>
+ <td>string</td>
+ <td>false</td>
+ <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
+ </tr>
+ <tr>
+ <td>template</td>
+ <td>string</td>
+ <td><code>'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'</code></td>
+ <td>
+ <p>Base HTML to use when creating the popover.</p>
+ <p>The popover's <code>title</code> will be injected into the <code>.popover-title</code>.</p>
+ <p>The popover's <code>content</code> will be injected into the <code>.popover-content</code>.</p>
+ <p><code>.arrow</code> will become the popover's arrow.</p>
+ <p>The outermost wrapper element should have the <code>.popover</code> class.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>title</td>
+ <td>string | function</td>
+ <td>''</td>
+ <td>
+ <p>Default title value if <code>title</code> attribute isn't present.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the popover is attached to.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>trigger</td>
+ <td>string</td>
+ <td>'click'</td>
+ <td>How popover is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
+ </tr>
+ <tr>
+ <td>viewport</td>
+ <td>string | object</td>
+ <td>{ selector: 'body', padding: 0 }</td>
+ <td>
+ <p>Keeps the popover within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<div class="bs-callout bs-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>
+
+### Methods
+
+#### $().popover(options)
+
+Initializes popovers for an element collection.
+
+#### .popover('show')
+
- Hides an elements popover.
++Reveals an element's popover. Popovers whose both title and content are zero-length are never displayed.
+
+{% highlight js %}$('#element').popover('show'){% endhighlight %}
+
+#### .popover('hide')
+
- Toggles an elements popover.
++Hides an element's popover.
+
+{% highlight js %}$('#element').popover('hide'){% endhighlight %}
+
+#### .popover('toggle')
+
++Toggles an element's popover.
+
+{% highlight js %}$('#element').popover('toggle'){% endhighlight %}
+
+#### .popover('destroy')
+
+Hides and destroys an element's popover.
+
+{% highlight js %}$('#element').popover('destroy'){% endhighlight %}
+
+### Events
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>show.bs.popover</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.popover</td>
+ <td>This event is fired when the popover has been made visible to the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>hide.bs.popover</td>
+ <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.popover</td>
+ <td>This event is fired when the popover has finished being hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myPopover').on('hidden.bs.popover', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
+---
+layout: page
+title: Srollspy
+---
+
+## Example in navbar
+
+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">
+ <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">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="navbar-brand" href="#">Project Name</a>
+ </div>
+ <div class="collapse navbar-collapse bs-example-js-navbar-scrollspy">
+ <ul class="nav navbar-nav">
+ <li><a href="#fat">@fat</a></li>
+ <li><a href="#mdo">@mdo</a></li>
+ <li class="dropdown">
+ <a href="#" id="navbarDrop1" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="navbarDrop1">
+ <li><a href="#one" tabindex="-1">one</a></li>
+ <li><a href="#two" tabindex="-1">two</a></li>
+ <li class="divider"></li>
+ <li><a href="#three" tabindex="-1">three</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ <div data-spy="scroll" data-target="#navbar-example2" data-offset="0" class="scrollspy-example">
+ <h4 id="fat">@fat</h4>
+ <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
+ <h4 id="mdo">@mdo</h4>
+ <p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p>
+ <h4 id="one">one</h4>
+ <p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p>
+ <h4 id="two">two</h4>
+ <p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p>
+ <h4 id="three">three</h4>
+ <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p>
+ <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
+ </p>
+ </div>
+</div>
+
+
+## Usage
+
++### Requires Bootstrap nav
++
++Scrollspy currently requires the use of a [Bootstrap nav component](/components/nav/) for proper highlighting of active links.
++
+### Requires relative positioning
+
+No matter the implementation method, scrollspy requires the use of `position: relative;` on the element you're spying on. In most cases this is the `<body>`.
+
+### Via data attributes
+
+To easily add scrollspy behavior to your topbar navigation, add `data-spy="scroll"` to the element you want to spy on (most typically this would be the `<body>`). Then add the `data-target` attribute with the ID or class of the parent element of any Bootstrap `.nav` component.
+
+{% highlight css %}
+body {
+ position: relative;
+}
+{% endhighlight %}
+
+{% highlight html %}
+<body data-spy="scroll" data-target=".navbar-example">
+ ...
+ <div class="navbar-example">
+ <ul class="nav nav-tabs" role="tablist">
+ ...
+ </ul>
+ </div>
+ ...
+</body>
+{% endhighlight %}
+
+### Via JavaScript
+
+After adding `position: relative;` in your CSS, call the scrollspy via JavaScript:
+
+{% highlight js %}
+$('body').scrollspy({ target: '.navbar-example' })
+{% endhighlight %}
+
+<div class="bs-callout bs-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">
+ <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>
+
+### Methods
+
+#### .scrollspy('refresh')
+
+When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:
+
+{% highlight js %}
+$('[data-spy="scroll"]').each(function () {
+ var $spy = $(this).scrollspy('refresh')
+})
+{% endhighlight %}
+
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-offset=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 100px;">type</th>
+ <th style="width: 50px;">default</th>
+ <th>description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>offset</td>
+ <td>number</td>
+ <td>10</td>
+ <td>Pixels to offset from top when calculating position of scroll.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+### Events
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>activate.bs.scrollspy</td>
+ <td>This event fires whenever a new item becomes activated by the scrollspy.</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+{% highlight js %}
+$('#myScrollspy').on('activate.bs.scrollspy', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
- <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
- <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+---
+layout: page
+title: Tabs
+---
+
+## Example
+
+Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.
+
+<div class="bs-example bs-example-tabs">
+ <ul id="myTab" class="nav nav-tabs" role="tablist">
- <a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
- <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1">
- <li><a href="#dropdown1" tabindex="-1" role="tab" data-toggle="tab">@fat</a></li>
- <li><a href="#dropdown2" tabindex="-1" role="tab" data-toggle="tab">@mdo</a></li>
++ <li role="presentation" class="active">
++ <a href="#home" id="home-tab" role="tab" data-toggle="tab" aria-controls="home" aria-expanded="true">Home</a>
++ </li>
++ <li role="presentation">
++ <a href="#profile" role="tab" id="profile-tab" data-toggle="tab" aria-controls="profile">Profile</a>
++ </li>
+ <li role="presentation" class="dropdown">
- <div role="tabpanel" class="tab-pane fade in active" id="home">
++ <a href="#" id="myTabDrop1" class="dropdown-toggle" data-toggle="dropdown" aria-controls="myTabDrop1-contents">
++ Dropdown
++ <span class="caret"></span>
++ </a>
++ <ul class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1" id="myTabDrop1-contents">
++ <li><a href="#dropdown1" tabindex="-1" role="tab" id="dropdown1-tab" data-toggle="tab" aria-controls="dropdown1">@fat</a></li>
++ <li><a href="#dropdown2" tabindex="-1" role="tab" id="dropdown2-tab" data-toggle="tab" aria-controls="dropdown2">@mdo</a></li>
+ </ul>
+ </li>
+ </ul>
+ <div id="myTabContent" class="tab-content">
- <div role="tabpanel" class="tab-pane fade" id="profile">
++ <div role="tabpanel" class="tab-pane fade in active" id="home" aria-labelledBy="home-tab">
+ <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
+ </div>
- <div role="tabpanel" class="tab-pane fade" id="dropdown1">
++ <div role="tabpanel" class="tab-pane fade" id="profile" aria-labelledBy="profile-tab">
+ <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
+ </div>
- <div role="tabpanel" class="tab-pane fade" id="dropdown2">
++ <div role="tabpanel" class="tab-pane fade" id="dropdown1" aria-labelledBy="dropdown1-tab">
+ <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
+ </div>
- <tr>
- <td>show.bs.tab</td>
- <td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
- </tr>
- <tr>
- <td>shown.bs.tab</td>
- <td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
++ <div role="tabpanel" class="tab-pane fade" id="dropdown2" aria-labelledBy="dropdown2-tab">
+ <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
+ </div>
+ </div>
+</div>
+
+<div class="bs-callout bs-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>
+
+## Usage
+
+Enable tabbable tabs via JavaScript (each tab needs to be activated individually):
+
+{% highlight js %}
+$('#myTab a').click(function (e) {
+ e.preventDefault()
+ $(this).tab('show')
+})
+{% endhighlight %}
+
+You can activate individual tabs in several ways:
+
+{% highlight js %}
+$('#myTab a[href="#profile"]').tab('show') // Select tab by name
+$('#myTab a:first').tab('show') // Select first tab
+$('#myTab a:last').tab('show') // Select last tab
+$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
+{% endhighlight %}
+
+### Markup
+
+You can activate a tab or pill navigation without writing any JavaScript by simply specifying `data-toggle="tab"` or `data-toggle="pill"` on an element. Adding the `.nav` and `.nav-tabs` classes to the tab `<ul>` will apply the Bootstrap <a href="../components/#nav-tabs">tab styling</a>, while adding the `.nav` and `.nav-pills` classes will apply <a href="../components/#nav-pills">pill styling</a>.
+
+{% highlight html %}
+<!-- Nav tabs -->
+<ul class="nav nav-tabs" role="tablist">
+ <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
+ <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+ <li role="presentation"><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
+ <li role="presentation"><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
+</ul>
+
+<!-- Tab panes -->
+<div class="tab-content">
+ <div role="tabpanel" class="tab-pane active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane" id="settings">...</div>
+</div>
+{% endhighlight %}
+
+### Fade effect
+
+To make tabs fade in, add `.fade` to each `.tab-pane`. The first tab pane must also have `.in to properly fade in initial content.
+
+{% highlight html %}
+<div class="tab-content">
+ <div role="tabpanel" class="tab-pane fade in active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane fade" id="settings">...</div>
+</div>
+{% endhighlight %}
+
+### Methods
+
+#### $().tab
+
+Activates a tab element and content container. Tab should have either a `data-target` or an `href` targeting a container node in the DOM.
+
+{% highlight html %}
+<ul class="nav nav-tabs" role="tablist" id="myTab">
+ <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">Home</a></li>
+ <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">Profile</a></li>
+ <li role="presentation"><a href="#messages" role="tab" data-toggle="tab">Messages</a></li>
+ <li role="presentation"><a href="#settings" role="tab" data-toggle="tab">Settings</a></li>
+</ul>
+
+<div class="tab-content">
+ <div role="tabpanel" class="tab-pane active" id="home">...</div>
+ <div role="tabpanel" class="tab-pane" id="profile">...</div>
+ <div role="tabpanel" class="tab-pane" id="messages">...</div>
+ <div role="tabpanel" class="tab-pane" id="settings">...</div>
+</div>
+
+<script>
+ $(function () {
+ $('#myTab a:last').tab('show')
+ })
+</script>
+{% endhighlight %}
+
+### Events
+
++When showing a new tab, the events fire in the following order:
++
++1. `hide.bs.tab` (on the current active tab)
++2. `show.bs.tab` (on the to-be-shown tab)
++3. `hidden.bs.tab` (on the previous active tab, the same one as for the `hide.bs.tab` event)
++4. `shown.bs.tab` (on the newly-active just-shown tab, the same one as for the `show.bs.tab` event)
++
++If no tab was already active, then the `hide.bs.tab` and `hidden.bs.tab` events will not be fired.
++
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
- e.target // activated tab
- e.relatedTarget // previous tab
++ <tr>
++ <td>show.bs.tab</td>
++ <td>This event fires on tab show, but before the new tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
+ </tr>
++ <tr>
++ <td>shown.bs.tab</td>
++ <td>This event fires on tab show after a tab has been shown. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab (if available) respectively.</td>
++ </tr>
++ <tr>
++ <td>hide.bs.tab</td>
++ <td>This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the current active tab and the new soon-to-be-active tab, respectively.</td>
++ </tr>
++ <tr>
++ <td>hidden.bs.tab</td>
++ <td>This event fires after a new tab is shown (and thus the previous active tab is hidden). Use <code>event.target</code> and <code>event.relatedTarget</code> to target the previous active tab and the new active tab, respectively.</td>
++ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
++ e.target // newly activated tab
++ e.relatedTarget // previous active tab
+})
+{% endhighlight %}
--- /dev/null
- Reveals an element's tooltip.
+---
+layout: page
+title: Tooltips
+---
+
+## Examples
+
+Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don't rely on images, use CSS3 for animations, and data-attributes for local title storage.
+
+Tooltips with zero-length titles are never displayed.
+
+Hover over the links below to see tooltips:
+
+<div class="bs-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>
+
+### Static demo
+
+Four options are available: top, right, bottom, and left aligned.
+
+<div class="bs-example bs-example-tooltip">
+ <div class="tooltip left" role="tooltip">
+ <div class="tooltip-arrow"></div>
+ <div class="tooltip-inner">
+ Tooltip on the left
+ </div>
+ </div>
+ <div class="tooltip top" role="tooltip">
+ <div class="tooltip-arrow"></div>
+ <div class="tooltip-inner">
+ Tooltip on the top
+ </div>
+ </div>
+ <div class="tooltip bottom" role="tooltip">
+ <div class="tooltip-arrow"></div>
+ <div class="tooltip-inner">
+ Tooltip on the bottom
+ </div>
+ </div>
+ <div class="tooltip right" role="tooltip">
+ <div class="tooltip-arrow"></div>
+ <div class="tooltip-inner">
+ Tooltip on the right
+ </div>
+ </div>
+</div>
+
+### Interactive demo
+
+Hover over the buttons below to see their tooltips.
+
+<div class="bs-example tooltip-demo">
+ <div class="bs-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>
+ <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button>
+ </div>
+</div>
+
+{% highlight html %}
+<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>
+<button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right">
+ Tooltip on right
+</button>
+{% endhighlight %}
+
+<div class="bs-callout bs-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>
+</div>
+<div class="bs-callout bs-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">
+ <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">
+ <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>
+
+## Usage
+
+The tooltip plugin generates content and markup on demand, and by default places tooltips after their trigger element.
+
+Trigger the tooltip via JavaScript:
+
+{% highlight js %}
+$('#example').tooltip(options)
+{% endhighlight %}
+
+### Markup
+
+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">
+ <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>
+
+{% highlight html %}
+<!-- HTML to write -->
+<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a>
+
+<!-- Generated markup by the plugin -->
+<div class="tooltip top" role="tooltip">
+ <div class="tooltip-arrow"></div>
+ <div class="tooltip-inner">
+ Some tooltip text!
+ </div>
+</div>
+{% endhighlight %}
+
+### Options
+
+Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-animation=""`.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 100px;">Name</th>
+ <th style="width: 100px;">Type</th>
+ <th style="width: 50px;">Default</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>animation</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>Apply a CSS fade transition to the tooltip</td>
+ </tr>
+ <tr>
+ <td>container</td>
+ <td>string | false</td>
+ <td>false</td>
+ <td>
+ <p>Appends the tooltip to a specific element. Example: <code>container: 'body'</code>. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element -Â which will prevent the tooltip from floating away from the triggering element during a window resize.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>delay</td>
+ <td>number | object</td>
+ <td>0</td>
+ <td>
+ <p>Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type</p>
+ <p>If a number is supplied, delay is applied to both hide/show</p>
+ <p>Object structure is: <code>delay: { "show": 500, "hide": 100 }</code></p>
+ </td>
+ </tr>
+ <tr>
+ <td>html</td>
+ <td>boolean</td>
+ <td>false</td>
+ <td>Insert HTML into the tooltip. If false, jQuery's <code>text</code> method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.</td>
+ </tr>
+ <tr>
+ <td>placement</td>
+ <td>string | function</td>
+ <td>'top'</td>
+ <td>
+ <p>How to position the tooltip - top | bottom | left | right | auto.<br>When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right.</p>
+ <p>When a function is used to determine the placement, it is called with the tooltip DOM node as its first argument and the triggering element DOM node as its second. The <code>this</code> context is set to the tooltip instance.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>selector</td>
+ <td>string</td>
+ <td>false</td>
+ <td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="https://github.com/twbs/bootstrap/issues/4215">this</a> and <a href="http://jsbin.com/zopod/1/edit">an informative example</a>.</td>
+ </tr>
+ <tr>
+ <td>template</td>
+ <td>string</td>
+ <td><code>'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'</code></td>
+ <td>
+ <p>Base HTML to use when creating the tooltip.</p>
+ <p>The tooltip's <code>title</code> will be injected into the <code>.tooltip-inner</code>.</p>
+ <p><code>.tooltip-arrow</code> will become the tooltip's arrow.</p>
+ <p>The outermost wrapper element should have the <code>.tooltip</code> class.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>title</td>
+ <td>string | function</td>
+ <td>''</td>
+ <td>
+ <p>Default title value if <code>title</code> attribute isn't present.</p>
+ <p>If a function is given, it will be called with its <code>this</code> reference set to the element that the tooltip is attached to.</p>
+ </td>
+ </tr>
+ <tr>
+ <td>trigger</td>
+ <td>string</td>
+ <td>'hover focus'</td>
+ <td>How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space.</td>
+ </tr>
+ <tr>
+ <td>viewport</td>
+ <td>string | object</td>
+ <td>{ selector: 'body', padding: 0 }</td>
+ <td>
+ <p>Keeps the tooltip within the bounds of this element. Example: <code>viewport: '#viewport'</code> or <code>{ "selector": "#viewport", "padding": 0 }</code></p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+<div class="bs-callout bs-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>
+
+### Methods
+
+#### $().tooltip(options)
+
+Attaches a tooltip handler to an element collection.
+
+#### .tooltip('show')
+
++Reveals an element's tooltip. Tooltips with zero-length titles are never displayed.
+
+{% highlight js %}$('#element').tooltip('show'){% endhighlight %}
+
+#### .tooltip('hide')
+
+Hides an element's tooltip.
+
+{% highlight js %}$('#element').tooltip('hide'){% endhighlight %}
+
+#### .tooltip('toggle')
+
+Toggles an element's tooltip.
+
+{% highlight js %}$('#element').tooltip('toggle'){% endhighlight %}
+
+#### .tooltip('destroy')
+
+Hides and destroys an element's tooltip.
+
+{% highlight js %}$('#element').tooltip('destroy'){% endhighlight %}
+
+### Events
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event Type</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>show.bs.tooltip</td>
+ <td>This event fires immediately when the <code>show</code> instance method is called.</td>
+ </tr>
+ <tr>
+ <td>shown.bs.tooltip</td>
+ <td>This event is fired when the tooltip has been made visible to the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ <tr>
+ <td>hide.bs.tooltip</td>
+ <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
+ </tr>
+ <tr>
+ <td>hidden.bs.tooltip</td>
+ <td>This event is fired when the tooltip has finished being hidden from the user (will wait for CSS transitions to complete).</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+{% highlight js %}
+$('#myTooltip').on('hidden.bs.tooltip', function () {
+ // do something…
+})
+{% endhighlight %}
--- /dev/null
+---
+layout: page
+title: Media
+---
+
+Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.
+
+### Default media
+
+The default media allow to float a media object (images, video, audio) to the left or right of a content block.
+
+{% example html %}
+<div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+ </div>
+</div>
+{% endexample %}
+
+### Nested media
+
+Media components can also be nested.
+
+{% example html %}
+<div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+ <div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Nested media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
+ </div>
+ </div>
+ </div>
+</div>
+{% endexample %}
+
++### Media alignment
++
++The images or other media can be aligned top, middle, or bottom. The default is top aligned.
++
++{% example html %}
++<div class="media">
++ <a class="media-left" href="#">
++ <img data-src="holder.js/64x64" alt="Generic placeholder image">
++ </a>
++ <div class="media-body">
++ <h4 class="media-heading">Top aligned media</h4>
++ <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
++ <p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
++ </div>
++</div>
++{% endexample %}
++
++{% example html %}
++<div class="media">
++ <a class="media-left media-middle" href="#">
++ <img data-src="holder.js/64x64" alt="Generic placeholder image">
++ </a>
++ <div class="media-body">
++ <h4 class="media-heading">Middle aligned media</h4>
++ <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
++ <p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
++ </div>
++</div>
++{% endexample %}
++
++{% example html %}
++<div class="media">
++ <a class="media-left media-bottom" href="#">
++ <img data-src="holder.js/64x64" alt="Generic placeholder image">
++ </a>
++ <div class="media-body">
++ <h4 class="media-heading">Bottom aligned media</h4>
++ <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.</p>
++ <p>Donec sed odio dui. Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
++ </div>
++</div>
++{% endexample %}
++
+### Media list
+
+With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).
+
+{% example html %}
+<ul class="media-list">
+ <li class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Media heading</h4>
+ <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
+ <!-- Nested media object -->
+ <div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Nested media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ <!-- Nested media object -->
+ <div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Nested media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- Nested media object -->
+ <div class="media">
+ <a class="pull-left" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Nested media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ </div>
+ </div>
+ </div>
+ </li>
+ <li class="media">
+ <a class="pull-right" href="#">
+ <img class="media-object" data-src="holder.js/64x64" alt="Generic placeholder image">
+ </a>
+ <div class="media-body">
+ <h4 class="media-heading">Media heading</h4>
+ Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
+ </div>
+ </li>
+</ul>
+{% endexample %}
--- /dev/null
- <div class="col-xs-6 col-sm-6">
+---
+layout: page
+title: Responsive utilities
+---
+
+For faster mobile-friendly development, use these utility classes for showing and hiding content by device via media query. Also included are utility classes for toggling content when printed.
+
+Try to use these on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.
+
+## Available classes
+
+Use a single or combination of the available classes for toggling content across viewport breakpoints.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped responsive-utilities">
+ <thead>
+ <tr>
+ <th></th>
+ <th>
+ Extra small devices
+ <small>Phones (<768px)</small>
+ </th>
+ <th>
+ Small devices
+ <small>Tablets (≥768px)</small>
+ </th>
+ <th>
+ Medium devices
+ <small>Desktops (≥992px)</small>
+ </th>
+ <th>
+ Large devices
+ <small>Desktops (≥1200px)</small>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th><code>.visible-xs-*</code></th>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ </tr>
+ <tr>
+ <th><code>.visible-sm-*</code></th>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ </tr>
+ <tr>
+ <th><code>.visible-md-*</code></th>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ </tr>
+ <tr>
+ <th><code>.visible-lg-*</code></th>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <th><code>.hidden-xs</code></th>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ </tr>
+ <tr>
+ <th><code>.hidden-sm</code></th>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ </tr>
+ <tr>
+ <th><code>.hidden-md</code></th>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ </tr>
+ <tr>
+ <th><code>.hidden-lg</code></th>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+As of v3.2.0, the `.visible-*-*` classes for each breakpoint come in three variations, one for each CSS `display` property value listed below.
+
+<div class="table-responsive">
+ <table class="table table-bordered table-striped">
+ <thead>
+ <tr>
+ <th>Group of classes</th>
+ <th>CSS <code>display</code></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>.visible-*-block</code></td>
+ <td><code>display: block;</code></td>
+ </tr>
+ <tr>
+ <td><code>.visible-*-inline</code></td>
+ <td><code>display: inline;</code></td>
+ </tr>
+ <tr>
+ <td><code>.visible-*-inline-block</code></td>
+ <td><code>display: inline-block;</code></td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<p>So, for extra small (<code>xs</code>) screens for example, the available <code>.visible-*-*</code> classes are: <code>.visible-xs-block</code>, <code>.visible-xs-inline</code>, and <code>.visible-xs-inline-block</code>.</p>
+
+<h2 id="responsive-utilities-print">Print classes</h2>
+<p>Similar to the regular responsive classes, use these for toggling content for print.</p>
+<div class="table-responsive">
+ <table class="table table-bordered table-striped responsive-utilities">
+ <thead>
+ <tr>
+ <th>Classes</th>
+ <th>Browser</th>
+ <th>Print</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>
+ <code>.visible-print-block</code><br>
+ <code>.visible-print-inline</code><br>
+ <code>.visible-print-inline-block</code>
+ </th>
+ <td class="is-hidden">Hidden</td>
+ <td class="is-visible">Visible</td>
+ </tr>
+ <tr>
+ <th><code>.hidden-print</code></th>
+ <td class="is-visible">Visible</td>
+ <td class="is-hidden">Hidden</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+
+## Test cases
+
+Resize your browser or load on different devices to test the responsive utility classes.
+
+### Visible on...
+
+Green checkmarks indicate the element **is visible** in your current viewport.
+
+<div class="row responsive-utilities-test visible-on">
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-xs">Extra small</span>
+ <span class="visible-xs-block">✔ Visible on x-small</span>
+ </div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-sm">Small</span>
+ <span class="visible-sm-block">✔ Visible on small</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-md">Medium</span>
+ <span class="visible-md-block">✔ Visible on medium</span>
+ </div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-lg">Large</span>
+ <span class="visible-lg-block">✔ Visible on large</span>
+ </div>
+</div>
+<div class="row responsive-utilities-test visible-on">
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-sm">Extra small and small</span>
+ <span class="visible-xs-block visible-sm-block">✔ Visible on x-small and small</span>
+ </div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-md hidden-lg">Medium and large</span>
+ <span class="visible-md-block visible-lg-block">✔ Visible on medium and large</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-md">Extra small and medium</span>
+ <span class="visible-xs-block visible-md-block">✔ Visible on x-small and medium</span>
+ </div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-sm hidden-lg">Small and large</span>
+ <span class="visible-sm-block visible-lg-block">✔ Visible on small and large</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-lg">Extra small and large</span>
+ <span class="visible-xs-block visible-lg-block">✔ Visible on x-small and large</span>
+ </div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-sm hidden-md">Small and medium</span>
+ <span class="visible-sm-block visible-md-block">✔ Visible on small and medium</span>
+ </div>
+</div>
+
+### Hidden on...
+
+Here, green checkmarks also indicate the element **is hidden** in your current viewport.
+
+<div class="row responsive-utilities-test hidden-on">
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-xs">Extra small</span>
+ <span class="visible-xs-block">✔ Hidden on x-small</span>
+ </div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-sm">Small</span>
+ <span class="visible-sm-block">✔ Hidden on small</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-md">Medium</span>
+ <span class="visible-md-block">✔ Hidden on medium</span>
+ </div>
+ <div class="col-xs-6 col-sm-3">
+ <span class="hidden-lg">Large</span>
+ <span class="visible-lg-block">✔ Hidden on large</span>
+ </div>
+</div>
+<div class="row responsive-utilities-test hidden-on">
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-sm">Extra small and small</span>
+ <span class="visible-xs-block visible-sm-block">✔ Hidden on x-small and small</span>
+ </div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-md hidden-lg">Medium and large</span>
+ <span class="visible-md-block visible-lg-block">✔ Hidden on medium and large</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-md">Extra small and medium</span>
+ <span class="visible-xs-block visible-md-block">✔ Hidden on x-small and medium</span>
+ </div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-sm hidden-lg">Small and large</span>
+ <span class="visible-sm-block visible-lg-block">✔ Hidden on small and large</span>
+ </div>
+ <div class="clearfix visible-xs-block"></div>
- <div class="col-xs-6 col-sm-6">
++ <div class="col-xs-6">
+ <span class="hidden-xs hidden-lg">Extra small and large</span>
+ <span class="visible-xs-block visible-lg-block">✔ Hidden on x-small and large</span>
+ </div>
++ <div class="col-xs-6">
+ <span class="hidden-sm hidden-md">Small and medium</span>
+ <span class="visible-sm-block visible-md-block">✔ Hidden on small and medium</span>
+ </div>
+</div>
position: relative;
height: 0;
overflow: hidden;
- .transition-property(~"height, visibility");
- .transition-duration(.35s);
- .transition-timing-function(ease);
+ transition: height .35s ease;
++ transition-property: height, visibility;
++ transition-duration: .35s;
++ transition-timing-function: ease;
}
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
- transform: translate3d(0, -25%, 0);
- .translate(0, -25%);
- .transition-transform(~"0.3s ease-out");
++ transform: translate(0, -25%);
+ transform: transition .3s ease-out;
}
- &.in .modal-dialog { transform: translate3d(0, 0, 0) }
+ &.in .modal-dialog { .translate(0, 0) }
}
.modal-open .modal {
overflow-x: hidden;
--- /dev/null
+//
+// Navs
+// --------------------------------------------------
+
+.nav {
+ margin-bottom: 0;
+ .list-unstyled();
+ &:extend(.clearfix all);
+}
+
+.nav-item {
+ position: relative;
+ display: inline-block;
+}
+
+.nav-link {
+ display: inline-block;
+ padding: @nav-link-padding;
+ line-height: @line-height-base;
+
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: @nav-link-hover-bg;
+ }
+
+ // Disabled state sets text to gray and nukes hover/tab effects
+ .disabled > &,
+ &.disabled {
+ color: @nav-disabled-link-color;
+
+ &,
+ &:hover,
+ &:focus {
+ color: @nav-disabled-link-hover-color;
+ background-color: transparent;
+ cursor: not-allowed;
+ }
+ }
+}
+
+
+//
+// Tabs
+//
+
+.nav-tabs {
+ border-bottom: 1px solid @nav-tabs-border-color;
+
+ .nav-item {
+ float: left;
+ // Make the list-items overlay the bottom border
+ margin-bottom: -1px;
+
+ + .nav-item {
+ margin-left: .2rem;
+ }
+ }
+
+ .nav-link {
+ display: block;
+ border: 1px solid transparent;
+ .border-radius(@border-radius-base @border-radius-base 0 0);
+
+ &:hover,
+ &:focus {
+ border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
+ }
+ }
+
+ .open > .nav-link,
+ .active > .nav-link,
+ .nav-link.open,
+ .nav-link.active {
+ &,
+ &:hover,
+ &:focus {
+ color: @nav-tabs-active-link-hover-color;
+ background-color: @nav-tabs-active-link-hover-bg;
+ border-color: @nav-tabs-active-link-hover-border-color @nav-tabs-active-link-hover-border-color transparent;
+ }
+ }
+
+ .disabled > .nav-link,
+ .nav-link.disabled {
+ &,
+ &:hover,
+ &:focus {
+ color: @nav-disabled-link-color;
+ background-color: transparent;
+ border-color: transparent;
+ }
+ }
+}
+
+
+//
+// Pills
+//
+
+.nav-pills {
+ .nav-item {
+ float: left;
+
+ + .nav-item {
+ margin-left: .2rem;
+ }
+ }
+
+ .nav-link {
+ display: block;
+ .border-radius(@nav-pills-border-radius);
+ }
+
+ .open > .nav-link,
+ .active > .nav-link,
+ .nav-link.open,
+ .nav-link.active {
+ &,
+ &:hover,
+ &:focus {
+ color: @component-active-color;
+ background-color: @component-active-bg;
+ cursor: default;
+ }
+ }
+}
+
+.nav-stacked {
+ .nav-item {
+ float: none;
+ display: block;
+
+ + .nav-item {
+ margin-top: .2rem;
+ margin-left: 0;
+ }
+ }
+}
+
+
+//
+// Tabbable tabs
+//
+
+// Hide tabbable panes to start, show them when `.active`
+.tab-content {
+ > .tab-pane {
+ display: none;
++ visibility: hidden;
+ }
+ > .active {
+ display: block;
++ visibility: visible;
+ }
+}
+
+
+//
+// Dropdowns
+//
+
+.nav-tabs .dropdown-menu {
+ // Make dropdown border overlap tab border
+ margin-top: -1px;
+ // Remove the top rounded corners here since there is a hard edge above the menu
+ .border-top-radius(0);
+}
--- /dev/null
- .progress[value="0"]::-webkit-progress-value {
- color: @gray-light;
- min-width: 2rem;
- background-color: transparent;
- background-image: none;
- }
+/*csslint empty-rules: false, important: true*/
+
+//
+// Progress bars
+// --------------------------------------------------
+
+
+//
+// Progress animations
+//
+
+@-webkit-keyframes progress-bar-stripes {
+ from { background-position: @line-height-computed 0; }
+ to { background-position: 0 0; }
+}
+
+@keyframes progress-bar-stripes {
+ from { background-position: @line-height-computed 0; }
+ to { background-position: 0 0; }
+}
+
+
+//
+// Basic progress bar
+//
+
+.progress {
+ display: block;
+ width: 100%;
+ height: @line-height-computed;
+ margin-bottom: @line-height-computed;
+}
+.progress[value] {
+ // Reset the default appearance
+ appearance: none;
+ // Remove Firefox and Opera border
+ border: 0;
+ // IE10 uses `color` to set the bar background-color
+ color: #0074d9;
+}
+.progress[value]::-webkit-progress-bar {
+ background-color: #eee;
+ .border-radius(@border-radius-base);
+ .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
+}
+.progress[value]::-webkit-progress-value::before {
+ content: attr(value);
+}
+.progress[value]::-webkit-progress-value {
+ background-color: #0074d9;
+ border-top-left-radius: @border-radius-base;
+ border-bottom-left-radius: @border-radius-base;
+}
- /* Commented out for now because linter.
- @-moz-document url-prefix() {
- .progress[value] {
- background-color: #eee;
- .border-radius(@border-radius-base);
- .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
- }
- .progress[value]::-moz-progress-bar {
- background-color: #0074d9;
- border-top-left-radius: @border-radius-base;
- border-bottom-left-radius: @border-radius-base;
- }
- .progress[value="0"]::-moz-progress-bar {
- color: @gray-light;
- min-width: 2rem;
- background-color: transparent;
- background-image: none;
- }
- .progress[value="100"]::-moz-progress-bar {
- border-top-right-radius: @border-radius-base;
- border-bottom-right-radius: @border-radius-base;
- }
- }
- */
+.progress[value="100"]::-webkit-progress-value {
+ border-top-right-radius: @border-radius-base;
+ border-bottom-right-radius: @border-radius-base;
+}
+
+// Firefox styles must be entirely separate or it busts Webkit styles.
++//
++// Commented out for now because linter.
++//
++// @-moz-document url-prefix() {
++// .progress[value] {
++// background-color: #eee;
++// .border-radius(@border-radius-base);
++// .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
++// }
++// .progress[value]::-moz-progress-bar {
++// background-color: #0074d9;
++// border-top-left-radius: @border-radius-base;
++// border-bottom-left-radius: @border-radius-base;
++// }
++// .progress[value="0"]::-moz-progress-bar {
++// color: @gray-light;
++// min-width: 2rem;
++// background-color: transparent;
++// background-image: none;
++// }
++// .progress[value="100"]::-moz-progress-bar {
++// border-top-right-radius: @border-radius-base;
++// border-bottom-right-radius: @border-radius-base;
++// }
++// }
++
+// IE9 hacks to accompany custom markup. We don't need to scope this via media queries, but I feel better doing it anyway.
+@media screen and (~"min-width:0\0") {
+ .progress {
+ background-color: #eee;
+ .border-radius(@border-radius-base);
+ .box-shadow(inset 0 .1rem .1rem rgba(0,0,0,.1));
+ }
+ .progress-bar {
+ display: inline-block;
+ height: @line-height-computed;
+ text-indent: -999rem; // Simulate hiding of value as in native `<progress>`
+ background-color: #0074d9;
+ border-top-left-radius: @border-radius-base;
+ border-bottom-left-radius: @border-radius-base;
+ }
+ .progress[width^="0"] {
+ color: @gray-light;
+ min-width: 2rem;
+ background-color: transparent;
+ background-image: none;
+ }
+ .progress[width="100%"] {
+ border-top-right-radius: @border-radius-base;
+ border-bottom-right-radius: @border-radius-base;
+ }
+}
+
+
+//
+// Striped
+//
+
+.progress-striped[value]::-webkit-progress-value {
+ #gradient > .striped();
+ background-size: @line-height-computed @line-height-computed;
+}
+.progress-striped[value]::-moz-progress-bar {
+ #gradient > .striped();
+ background-size: @line-height-computed @line-height-computed;
+}
+@media screen and (~"min-width:0\0") {
+ .progress-bar-striped {
+ #gradient > .striped();
+ background-size: @line-height-computed @line-height-computed;
+ }
+}
+
+
+//
+// Animated
+//
+
+.progress-animated[value]::-webkit-progress-value {
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-animated[value]::-moz-progress-bar {
+ animation: progress-bar-stripes 2s linear infinite;
+}
+@media screen and (~"min-width:0\0") {
+ .progress-animated .progress-bar-striped {
+ animation: progress-bar-stripes 2s linear infinite;
+ }
+}
+
+
+//
+// Variations
+//
+
+.progress-success {
+ .progress-variant(@progress-bar-success-bg);
+}
+.progress-info {
+ .progress-variant(@progress-bar-info-bg);
+}
+.progress-warning {
+ .progress-variant(@progress-bar-warning-bg);
+}
+.progress-danger {
+ .progress-variant(@progress-bar-danger-bg);
+}
//## Settings for some of the most global styles.
//** Background color for `<body>`.
-@body-bg: #fff;
+@body-bg: #fff;
//** Global text color on `<body>`.
-@text-color: @gray-dark;
+@text-color: @gray-dark;
//** Global textual link color.
-@link-color: @brand-primary;
+@link-color: @brand-primary;
//** Link hover color set via `darken()` function.
-@link-hover-color: darken(@link-color, 15%);
+@link-hover-color: darken(@link-color, 15%);
+ //** Link hover decoration.
-@link-hover-decoration: underline;
++@link-hover-decoration: underline;
+//== Global settings
+//
+//## Quickly modify global styling by enabling or disabling features.
+
+@enable-rounded: true;
+@enable-shadows: true;
+@enable-gradients: true;
+@enable-transitions: true;
+
+@spacer: 1rem;
+@border-width: .075rem;
+
//== Typography
//
//## Font, line-height, and color for body text, headings, and more.