diff options
| author | Mark Otto <[email protected]> | 2014-07-07 22:10:22 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2014-07-07 22:10:22 -0700 |
| commit | 81b59d35368bc51d361d0352cc92fe99dc580fbf (patch) | |
| tree | 2395d5e79edaaa8c0a7ad82e99931ec895421532 /docs/_includes/css | |
| parent | fed2b0f7eb78438eb1b768782b04651881d88740 (diff) | |
| parent | ddee04038f946ac103eb4e70c8eb7adeb2cf563b (diff) | |
| download | bootstrap-81b59d35368bc51d361d0352cc92fe99dc580fbf.tar.xz bootstrap-81b59d35368bc51d361d0352cc92fe99dc580fbf.zip | |
Merge branch 'master' into derp
Conflicts:
docs/_layouts/default.html
docs/assets/css/docs.min.css
docs/assets/css/src/docs.css
docs/assets/js/docs.min.js
docs/assets/js/src/application.js
Diffstat (limited to 'docs/_includes/css')
| -rw-r--r-- | docs/_includes/css/buttons.html | 4 | ||||
| -rw-r--r-- | docs/_includes/css/code.html | 6 | ||||
| -rw-r--r-- | docs/_includes/css/forms.html | 172 | ||||
| -rw-r--r-- | docs/_includes/css/grid.html | 62 | ||||
| -rw-r--r-- | docs/_includes/css/helpers.html | 11 | ||||
| -rw-r--r-- | docs/_includes/css/images.html | 4 | ||||
| -rw-r--r-- | docs/_includes/css/less.html | 16 | ||||
| -rw-r--r-- | docs/_includes/css/responsive-utilities.html | 6 | ||||
| -rw-r--r-- | docs/_includes/css/rtl.html | 20 | ||||
| -rw-r--r-- | docs/_includes/css/tables.html | 14 | ||||
| -rw-r--r-- | docs/_includes/css/type.html | 22 |
11 files changed, 262 insertions, 75 deletions
diff --git a/docs/_includes/css/buttons.html b/docs/_includes/css/buttons.html index f6a131aaa..bfc5ded80 100644 --- a/docs/_includes/css/buttons.html +++ b/docs/_includes/css/buttons.html @@ -88,7 +88,7 @@ <h2 id="buttons-active">Active state</h2> - <p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code><button></code> elements, this is done via <code>:active</code>. For <code><a></code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> on <code><button></code>s should you need to replicate the active state progammatically.</p> + <p>Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. For <code><button></code> elements, this is done via <code>:active</code>. For <code><a></code> elements, it's done with <code>.active</code>. However, you may use <code>.active</code> on <code><button></code>s should you need to replicate the active state programmatically.</p> <h3>Button element</h3> <p>No need to add <code>:active</code> as it's a pseudo-class, but if you need to force the same appearance, go ahead and add <code>.active</code>.</p> @@ -173,6 +173,6 @@ <div class="bs-callout bs-callout-warning"> <h4>Cross-browser rendering</h4> <p>As a best practice, <strong>we highly recommend using the <code><button></code> element whenever possible</strong> to ensure matching cross-browser rendering.</p> - <p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a Firefox bug</a> that prevents us from setting the <code>line-height</code> of <code><input></code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p> + <p>Among other things, there's <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=697451">a bug in Firefox <30</a> that prevents us from setting the <code>line-height</code> of <code><input></code>-based buttons, causing them to not exactly match the height of other buttons on Firefox.</p> </div> </div> diff --git a/docs/_includes/css/code.html b/docs/_includes/css/code.html index 0d1396145..ba2edc151 100644 --- a/docs/_includes/css/code.html +++ b/docs/_includes/css/code.html @@ -13,10 +13,12 @@ For example, <code><section></code> should be wrapped as inline. <h2 id="code-user-input">User input</h2> <p>Use the <code><kbd></code> to indicate input that is typically entered via keyboard.</p> <div class="bs-example"> - To switch directories, type <kbd>cd</kbd> followed by the name of the directory. + To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br> + To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd> </div> {% highlight html %} - To switch directories, type <kbd>cd</kbd> followed by the name of the directory. +To switch directories, type <kbd>cd</kbd> followed by the name of the directory.<br> +To edit settings, press <kbd><kbd>ctrl</kbd> + <kbd>,</kbd></kbd> {% endhighlight %} <h2 id="code-block">Basic block</h2> diff --git a/docs/_includes/css/forms.html b/docs/_includes/css/forms.html index eb2141cf1..08b3e77ae 100644 --- a/docs/_includes/css/forms.html +++ b/docs/_includes/css/forms.html @@ -49,17 +49,17 @@ <button type="submit" class="btn btn-default">Submit</button> </form> {% endhighlight %} - <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> + <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> <h2 id="forms-inline">Inline form</h2> <p>Add <code>.form-inline</code> to your <code><form></code> for left-aligned and inline-block controls. <strong>This only applies to forms within viewports that are at least 768px wide.</strong></p> <div class="bs-callout bs-callout-danger"> <h4>Requires custom widths</h4> - <p>Inputs, selects, and textareas are 100% wide by default in Bootstrap. To use the inline form, you'll have to set a width on the form controls used within.</p> + <p>Inputs and selects have <code>width: 100%;</code> applied by default in Bootstrap. Within inline forms, we reset that to <code>width: auto;</code> 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> @@ -96,6 +96,12 @@ <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> @@ -207,7 +213,8 @@ {% endhighlight %} <h3>Checkboxes and radios</h3> - <p>Checkboxes are for selecting one or several options in a list while radios are for selecting one option from many.</p> + <p>Checkboxes are for selecting one or several options in a list, while radios are for selecting one option from many.</p> + <p>A checkbox or radio with the <code>disabled</code> attribute will be styled appropriately. To have the <code><label></code> for the checkbox or radio also display a "not-allowed" cursor when the user hovers over the label, add the <code>.disabled</code> class to your <code>.radio</code>, <code>.radio-inline</code>, <code>.checkbox</code>, <code>.checkbox-inline</code>, or <code><fieldset></code>.</p> <h4>Default (stacked)</h4> <div class="bs-example"> <form role="form"> @@ -217,6 +224,12 @@ 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> <br> <div class="radio"> <label> @@ -230,6 +243,12 @@ 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> </form> </div><!-- /.bs-example --> {% highlight html %} @@ -239,6 +258,12 @@ 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> @@ -252,9 +277,15 @@ 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> {% endhighlight %} - <h4>Inline checkboxes</h4> + <h4>Inline checkboxes and radios</h4> <p>Use the <code>.checkbox-inline</code> or <code>.radio-inline</code> classes on a series of checkboxes or radios for controls that appear on the same line.</p> <div class="bs-example"> <form role="form"> @@ -268,6 +299,18 @@ <input type="checkbox" id="inlineCheckbox3" value="option3"> 3 </label> </form> + <br> + <form role="form"> + <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> + </form> </div><!-- /.bs-example --> {% highlight html %} <label class="checkbox-inline"> @@ -279,6 +322,16 @@ <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> {% endhighlight %} <h3>Selects</h3> @@ -468,6 +521,30 @@ <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> </form> </div><!-- /.bs-example --> {% highlight html %} @@ -483,13 +560,37 @@ <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> {% endhighlight %} <h3>With optional icons</h3> <p>You can also add optional feedback icons with the addition of <code>.has-feedback</code> and the right icon.</p> <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. For inputs without labels, adjust the <code>top</code>value. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p> + <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 <code>sr-only</code> class. If you must do without labels, adjust the <code>top</code> value of the feedback icon. For input groups, adjust the <code>right</code> value to an appropriate pixel value depending on the width of your addon.</p> </div> <div class="bs-example"> <form role="form"> @@ -528,7 +629,7 @@ </div> {% endhighlight %} - <p>Optional icons also work on horizontal and inline forms.</p> + <h4>Optional icons in horizontal and inline forms</h4> <div class="bs-example"> <form class="form-horizontal" role="form"> <div class="form-group has-success has-feedback"> @@ -571,6 +672,23 @@ </form> {% endhighlight %} + <h4>Optional icons with hidden <code>.sr-only</code> labels</h4> + <p>For form controls with no visible label, add the <code>.sr-only</code> class on the label. Bootstrap will automatically adjust the position of the icon once it's been added.</p> + <div class="bs-example"> + <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> + </div> +{% highlight 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> +{% endhighlight %} + <h2 id="forms-control-sizes">Control sizing</h2> <p>Set heights using classes like <code>.input-lg</code>, and set widths using grid column classes like <code>.col-lg-*</code>.</p> @@ -606,6 +724,42 @@ <select class="form-control input-sm">...</select> {% endhighlight %} + <h3>Horizontal form group sizes</h3> + <p>Quickly size labels and form controls within <code>.form-horizontal</code> by adding <code>.form-group-lg</code> or <code>.form-group-sm</code>.</p> + <div class="bs-example"> + <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> + </div><!-- /.bs-example --> +{% highlight 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> +{% endhighlight %} + + <h3>Column sizing</h3> <p>Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.</p> <div class="bs-example"> diff --git a/docs/_includes/css/grid.html b/docs/_includes/css/grid.html index 992612e85..429ef90f9 100644 --- a/docs/_includes/css/grid.html +++ b/docs/_includes/css/grid.html @@ -13,6 +13,7 @@ <li>Columns create gutters (gaps between column content) via <code>padding</code>. That padding is offset in rows for the first and last column via negative margin on <code>.row</code>s.</li> <li>The negative margin is why the examples below are outdented. It's so that content within grid columns is lined up with non-grid content.</li> <li>Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three <code>.col-xs-4</code>.</li> + <li>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</li> <li>Grid classes apply to devices with screen widths greater than or equal to the breakpoint sizes, and override grid classes targeted at smaller devices. Therefore, applying any <code>.col-md-</code> class to an element will not only affect its styling on medium devices but also on large devices if a <code>.col-lg-</code> class is not present.</li> </ul> <p>Look to the examples for applying these principles to your code.</p> @@ -67,49 +68,49 @@ </thead> <tbody> <tr> - <th>Grid behavior</th> + <th class="text-nowrap">Grid behavior</th> <td>Horizontal at all times</td> <td colspan="3">Collapsed to start, horizontal above breakpoints</td> </tr> <tr> - <th>Container width</th> + <th class="text-nowrap">Container width</th> <td>None (auto)</td> <td>750px</td> <td>970px</td> <td>1170px</td> </tr> <tr> - <th>Class prefix</th> + <th class="text-nowrap">Class prefix</th> <td><code>.col-xs-</code></td> <td><code>.col-sm-</code></td> <td><code>.col-md-</code></td> <td><code>.col-lg-</code></td> </tr> <tr> - <th># of columns</th> + <th class="text-nowrap"># of columns</th> <td colspan="4">12</td> </tr> <tr> - <th>Column width</th> + <th class="text-nowrap">Column width</th> <td class="text-muted">Auto</td> <td>~62px</td> <td>~81px</td> <td>~97px</td> </tr> <tr> - <th>Gutter width</th> + <th class="text-nowrap">Gutter width</th> <td colspan="4">30px (15px on each side of a column)</td> </tr> <tr> - <th>Nestable</th> + <th class="text-nowrap">Nestable</th> <td colspan="4">Yes</td> </tr> <tr> - <th>Offsets</th> + <th class="text-nowrap">Offsets</th> <td colspan="4">Yes</td> </tr> <tr> - <th>Column ordering</th> + <th class="text-nowrap">Column ordering</th> <td colspan="4">Yes</td> </tr> </tbody> @@ -254,6 +255,23 @@ </div> {% endhighlight %} + <h3 id="grid-example-wrapping">Example: Column wrapping</h3> + <p>If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line.</p> + <div class="bs-docs-grid"> + <div class="row show-grid"> + <div class="col-xs-9">.col-xs-9</div> + <div class="col-xs-4">.col-xs-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> + <div class="col-xs-6">.col-xs-6<br>Subsequent columns continue along the new line.</div> + </div> + </div> +{% highlight html %} +<div class="row"> + <div class="col-xs-9">.col-xs-9</div> + <div class="col-xs-4">.col-xs-4<br>Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.</div> + <div class="col-xs-6">.col-xs-6<br>Subsequent columns continue along the new line.</div> +</div> +{% endhighlight %} + <h3 id="grid-responsive-resets">Responsive column resets</h3> <p>With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a <code>.clearfix</code> and our <a href="#responsive-utilities">responsive utility classes</a>.</p> <div class="bs-docs-grid"> @@ -329,30 +347,30 @@ <h3 id="grid-nesting">Nesting columns</h3> - <p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-md-*</code> columns within an existing <code>.col-md-*</code> column. Nested rows should include a set of columns that add up to 12 or less.</p> + <p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.col-sm-*</code> columns within an existing <code>.col-sm-*</code> column. Nested rows should include a set of columns that add up to 12 or less (it is not required that you use all 12 available columns).</p> <div class="row show-grid"> - <div class="col-md-9"> - Level 1: .col-md-9 + <div class="col-sm-9"> + Level 1: .col-sm-9 <div class="row show-grid"> - <div class="col-md-6"> - Level 2: .col-md-6 + <div class="col-xs-8 col-sm-6"> + Level 2: .col-xs-8 .col-sm-6 </div> - <div class="col-md-6"> - Level 2: .col-md-6 + <div class="col-xs-4 col-sm-6"> + Level 2: .col-xs-4 .col-sm-6 </div> </div> </div> </div> {% highlight html %} <div class="row"> - <div class="col-md-9"> - Level 1: .col-md-9 + <div class="col-sm-9"> + Level 1: .col-sm-9 <div class="row"> - <div class="col-md-6"> - Level 2: .col-md-6 + <div class="col-xs-8 col-sm-6"> + Level 2: .col-xs-8 .col-sm-6 </div> - <div class="col-md-6"> - Level 2: .col-md-6 + <div class="col-xs-4 col-sm-6"> + Level 2: .col-xs-4 .col-sm-6 </div> </div> </div> diff --git a/docs/_includes/css/helpers.html b/docs/_includes/css/helpers.html index e787a3103..9b7223740 100644 --- a/docs/_includes/css/helpers.html +++ b/docs/_includes/css/helpers.html @@ -40,15 +40,18 @@ <p class="bg-warning">...</p> <p class="bg-danger">...</p> {% endhighlight %} - + <div class="bs-callout bs-callout-info"> + <h4>Dealing with specificity</h4> + <p>Sometimes contextual background classes cannot be applied due to the specificity of another selector. In some cases, a sufficient workaround is to wrap your element's content in a <code><div></code> with the class.</p> + </div> <h3 id="helper-classes-close">Close icon</h3> <p>Use the generic close icon for dismissing content like modals and alerts.</p> <div class="bs-example"> - <p><button type="button" class="close" aria-hidden="true">×</button></p> + <p><button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button></p> </div> {% highlight html %} -<button type="button" class="close" aria-hidden="true">×</button> +<button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> {% endhighlight %} @@ -113,7 +116,7 @@ <h3 id="helper-classes-clearfix">Clearfix</h3> - <p>Clear the <code>float</code> on any element with the <code>.clearfix</code> class. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p> + <p>Easily clear <code>float</code>s by adding <code>.clearfix</code> <strong>to the parent element</strong>. Utilizes <a href="http://nicolasgallagher.com/micro-clearfix-hack/">the micro clearfix</a> as popularized by Nicolas Gallagher. Can also be used as a mixin.</p> {% highlight html %} <!-- Usage as a class --> <div class="clearfix">...</div> diff --git a/docs/_includes/css/images.html b/docs/_includes/css/images.html index 4e0fc4a77..78f4c65b8 100644 --- a/docs/_includes/css/images.html +++ b/docs/_includes/css/images.html @@ -3,6 +3,10 @@ <h2 id="images-responsive">Responsive images</h2> <p>Images in Bootstrap 3 can be made responsive-friendly via the addition of the <code>.img-responsive</code> class. This applies <code>max-width: 100%;</code> and <code>height: auto;</code> to the image so that it scales nicely to the parent element.</p> + <div class="bs-callout bs-callout-warning"> + <h4>SVG images and IE 8-10</h4> + <p>In Internet Explorer IE 8-10, SVG images with <code>.img-responsive</code> are disproportionately sized. To fix this, add <code>width: 100% \9;</code> where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.</p> + </div> {% highlight html %} <img src="..." class="img-responsive" alt="Responsive image"> {% endhighlight %} diff --git a/docs/_includes/css/less.html b/docs/_includes/css/less.html index b6d46da29..b325ea9eb 100644 --- a/docs/_includes/css/less.html +++ b/docs/_includes/css/less.html @@ -7,7 +7,7 @@ <h2 id="less-bootstrap">Compiling Bootstrap</h2> - <p>Bootstrap can be used in at least two ways: with the compiled CSS or with the source Less files. To compile the Less files, <a href="https://github.com/twbs/bootstrap#compiling-css-and-javascript">visit the README</a> for how to setup your development environment to run the necessary commands.</p> + <p>Bootstrap can be used in at least two ways: with the compiled CSS or with the source Less files. To compile the Less files, <a href="../getting-started/#grunt">consult the Getting Started section</a> for how to setup your development environment to run the necessary commands.</p> <p>Third party compilation tools may work with Bootstrap, but they are not supported by our core team.</p> <h2 id="less-variables">Variables</h2> @@ -28,7 +28,7 @@ @gray-darker: lighten(#000, 13.5%); // #222 @gray-dark: lighten(#000, 20%); // #333 @gray: lighten(#000, 33.5%); // #555 -@gray-light: lighten(#000, 60%); // #999 +@gray-light: lighten(#000, 46.7%); // #777 @gray-lighter: lighten(#000, 93.5%); // #eee {% endhighlight %} @@ -76,7 +76,7 @@ {% highlight scss %} // Variables @link-color: @brand-primary; -@link-color-hover: darken(@link-color, 15%); +@link-hover-color: darken(@link-color, 15%); // Usage a { @@ -84,12 +84,12 @@ a { text-decoration: none; &:hover { - color: @link-color-hover; + color: @link-hover-color; text-decoration: underline; } } {% endhighlight %} - <p>Note that the <code>@link-color-hover</code> uses a function, another awesome tool from Less, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p> + <p>Note that the <code>@link-hover-color</code> uses a function, another awesome tool from Less, to automagically create the right hover color. You can use <code>darken</code>, <code>lighten</code>, <code>saturate</code>, and <code>desaturate</code>.</p> <h3 id="less-variables-typography">Typography</h3> <p>Easily set your type face, text size, leading, and more with a few quick variables. Bootstrap makes use of these as well to provide easy typographic mixins.</p> @@ -378,10 +378,10 @@ a { {% highlight scss %} #gradient > .striped(#333; 45deg); {% endhighlight %} - <p>Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a decimal value like 0.25), and the third color with these mixins:</p> + <p>Up the ante and use three colors instead. Set the first color, the second color, the second color's color stop (a percentage value like 25%), and the third color with these mixins:</p> {% highlight scss %} -#gradient > .vertical-three-colors(#777; #333; .25; #000); -#gradient > .horizontal-three-colors(#777; #333; .25; #000); +#gradient > .vertical-three-colors(#777; #333; 25%; #000); +#gradient > .horizontal-three-colors(#777; #333; 25%; #000); {% endhighlight %} <p><strong>Heads up!</strong> Should you ever need to remove a gradient, be sure to remove any IE-specific <code>filter</code> you may have added. You can do that by using the <code>.reset-filter()</code> mixin alongside <code>background-image: none;</code>.</p> diff --git a/docs/_includes/css/responsive-utilities.html b/docs/_includes/css/responsive-utilities.html index 260eea3cc..666c0bce7 100644 --- a/docs/_includes/css/responsive-utilities.html +++ b/docs/_includes/css/responsive-utilities.html @@ -93,7 +93,7 @@ </table> </div> - <p>As of v3.2, the <code>.visible-*-*</code> classes for each breakpoint come in three variations, one for each CSS <code>display</code> property value listed below.</p> + <p>As of v3.2.0, the <code>.visible-*-*</code> classes for each breakpoint come in three variations, one for each CSS <code>display</code> property value listed below.</p> <div class="table-responsive"> <table class="table table-bordered table-striped"> <thead> @@ -119,7 +119,7 @@ </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> - <p>The classes <code>.visible-xs</code>, <code>.visible-sm</code>, <code>.visible-md</code>, and <code>.visible-lg</code> also exist, but are <strong>deprecated as of v3.2</strong>. They are approximately equivalent to <code>.visible-*-block</code>, except with additional special cases for toggling <code><table></code>-related elements.</p> + <p>The classes <code>.visible-xs</code>, <code>.visible-sm</code>, <code>.visible-md</code>, and <code>.visible-lg</code> also exist, but are <strong>deprecated as of v3.2.0</strong>. They are approximately equivalent to <code>.visible-*-block</code>, except with additional special cases for toggling <code><table></code>-related elements.</p> <h2 id="responsive-utilities-print">Print classes</h2> <p>Similar to the regular responsive classes, use these for toggling content for print.</p> @@ -150,7 +150,7 @@ </tbody> </table> </div> - <p>The class <code>.visible-print</code> also exists but is <strong>deprecated</strong> as of v3.1.0. It is approximately equivalent to <code>.visible-print-block</code>, except with additional special cases for <code><table></code>-related elements.</p> + <p>The class <code>.visible-print</code> also exists but is <strong>deprecated</strong> as of v3.2.0. It is approximately equivalent to <code>.visible-print-block</code>, except with additional special cases for <code><table></code>-related elements.</p> <h2 id="responsive-utilities-tests">Test cases</h2> diff --git a/docs/_includes/css/rtl.html b/docs/_includes/css/rtl.html deleted file mode 100644 index 050c429b1..000000000 --- a/docs/_includes/css/rtl.html +++ /dev/null @@ -1,20 +0,0 @@ -<div class="bs-docs-section"> - <h1 id="rtl" class="page-header">RTL</h1> - <p class="lead">As of Bootstrap 3.2, a right-to-left version of Bootstrap ships as part of the repository. It's powered by Twitter's <a href="https://github.com/twitter/css-flip">CSS Flip project</a> and is generated via our Gruntfile.</p> - - <h2 id="rtl-how-to">How to use</h2> - <p>Bootstrap is by default a left-to-right project. For right-to-left projects, you'll need to set your language and replace the default Bootstrap CSS with an RTL version. First, set your language and text direction:</p> -{% highlight html %} -<!-- Example: Arabic language with direction set to RTL --> -<html lang="ar" dir="rtl"> -{% endhighlight %} - <p>Then, include the right-to-left CSS file in place of the default Bootstrap CSS:</p> -{% highlight html %} -<!-- Bootstrap RTL --> -<link rel="stylesheet" href="bootstrap-rtl.css"> -{% endhighlight %} - <p>Alternatively, you may use the minified RTL file, <code>bootstrap-rtl.min.css</code>.</p> - - <h2 id="rtl-css-flip">CSS Flip</h2> - <p><a href="https://github.com/twitter/css-flip">CSS Flip</a> is a project for converting left-to-right CSS files into right-to-left CSS files. We use it in our Gruntfile to automate the generation of Bootstrap's RTL CSS files.</p> -</div> diff --git a/docs/_includes/css/tables.html b/docs/_includes/css/tables.html index 99db2af72..655545112 100644 --- a/docs/_includes/css/tables.html +++ b/docs/_includes/css/tables.html @@ -348,7 +348,19 @@ <h2 id="tables-responsive">Responsive tables</h2> - <p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p> + <p>Create responsive tables by wrapping any <code>.table</code> in <code>.table-responsive</code> to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.</p> + + <div class="bs-callout bs-callout-warning"> + <h4>Firefox and fieldsets</h4> + <p>Firefox has some awkward fieldset styling involving <code>width</code> that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we <strong>don't</strong> provide in Bootstrap:</p> +{% highlight css %} +@-moz-document url-prefix() { + fieldset { display: table-cell; } +} +{% endhighlight %} + <p>For more information, read <a href="http://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685">this Stack Overflow answer</a>.</p> + </div> + <div class="bs-example"> <div class="table-responsive"> <table class="table"> diff --git a/docs/_includes/css/type.html b/docs/_includes/css/type.html index 9c5aee200..6eca026de 100644 --- a/docs/_includes/css/type.html +++ b/docs/_includes/css/type.html @@ -107,12 +107,12 @@ <!-- Inline text elements --> <h2 id="type-inline-text">Inline text elements</h2> <h3>Marked text</h3> - <p>For indicating blocks of text that have been deleted use the <code><mark></code> tag.</p> + <p>For highlighting a run of text due to its relevance in another context, use the <code><mark></code> tag.</p> <div class="bs-example"> <p>You can use the mark tag to <mark>highlight</mark> text.</p> </div> {% highlight html %} -<mark>This line of text is meant to be treated as deleted text.</mark> +You can use the mark tag to <mark>highlight</mark> text. {% endhighlight %} @@ -146,10 +146,10 @@ <h3>Underlined text</h3> <p>To underline text use the <code><u></code> tag.</p> <div class="bs-example"> - <p><u>This line of text is will render as underlined</u></p> + <p><u>This line of text will render as underlined</u></p> </div> {% highlight html %} -<u>This line of text is will render as underlined</u> +<u>This line of text will render as underlined</u> {% endhighlight %} <p>Make use of HTML's default emphasis tags with lightweight styles.</p> @@ -195,14 +195,28 @@ <p class="text-center">Center aligned text.</p> <p class="text-right">Right aligned text.</p> <p class="text-justify">Justified text.</p> + <p class="text-nowrap">No wrap text.</p> </div> {% highlight html %} <p class="text-left">Left aligned text.</p> <p class="text-center">Center aligned text.</p> <p class="text-right">Right aligned text.</p> <p class="text-justify">Justified text.</p> +<p class="text-nowrap">No wrap text.</p> {% endhighlight %} + <h2 id="type-transformation">Transformation classes</h2> + <p>Transform text in components with text capitalization classes.</p> + <div class="bs-example"> + <p class="text-lowercase">Lowercased text.</p> + <p class="text-uppercase">Uppercased text.</p> + <p class="text-capitalize">Capitalized text.</p> + </div> +{% highlight html %} +<p class="text-lowercase">Lowercased text.</p> +<p class="text-uppercase">Uppercased text.</p> +<p class="text-capitalize">Capitalized text.</p> +{% endhighlight %} <!-- Abbreviations --> <h2 id="type-abbreviations">Abbreviations</h2> |
