diff --git a/docs/base-css.html b/docs/base-css.html index 5c9d07b8e2..e0ecc0b04c 100644 --- a/docs/base-css.html +++ b/docs/base-css.html @@ -779,29 +779,25 @@ For example, <code>section</code> should be wrapped as inline. -
-
-

Flexible HTML and CSS

-

The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.

-

More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.

-
-
-

Four layouts included

-

Bootstrap comes with support for four types of form layouts:

- -

Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.

-
-
-

Control states and more

-

Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.

-

States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.

-
-
+ +

Flexible HTML and CSS

+

The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.

+

More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.

+ +

Four layouts included

+

Bootstrap comes with support for four types of form layouts:

+ +

Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.

+ +

Control states and more

+

Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.

+

States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.

+

Four types of forms

Bootstrap provides simple markup and styles for four styles of common web forms.

@@ -839,19 +835,17 @@ For example, <code>section</code> should be wrapped as inline.

Example forms using just form controls, no extra markup

-
-
-

Basic form

-

Smart and lightweight defaults without extra markup.

-
- - -

Example block-level help text here.

- - -
+

Basic form

+

Smart and lightweight defaults without extra markup.

+
+ + +

Example block-level help text here.

+ + +
 <form class="well">
   <label>Label name</label>
@@ -863,14 +857,13 @@ For example, <code>section</code> should be wrapped as inline.
   <button type="submit" class="btn">Submit</button>
 </form>
 
-
-
-

Search form

-

Add .form-search to the form and .search-query to the input.

- + +

Search form

+

Add .form-search to the form and .search-query to the input.

+
 <form class="well form-search">
   <input type="text" class="input-medium search-query">
@@ -878,16 +871,16 @@ For example, <code>section</code> should be wrapped as inline.
 </form>
 
-

Inline form

-

Add .form-inline to finesse the vertical alignment and spacing of form controls.

-
- - - - -
+

Inline form

+

Add .form-inline to finesse the vertical alignment and spacing of form controls.

+
+ + + + +
 <form class="well form-inline">
   <input type="text" class="input-small" placeholder="Email">
@@ -898,89 +891,83 @@ For example, <code>section</code> should be wrapped as inline.
   <button type="submit" class="btn">Sign in</button>
 </form>
 
-
-

Horizontal forms

-
-
-

-

Shown on the right are all the default form controls we support. Here's the bulleted list:

- -
-
-
-
-
- -
- -

In addition to freeform text, any HTML5 text-based input appears like so.

-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- - -
-
-
-

Example markup

-

Given the above example form layout, here's the markup associated with the first input and control group. The .control-group, .control-label, and .controls classes are all required for styling.

+

Shown on the right are all the default form controls we support. Here's the bulleted list:

+ + +
+
+
+ +
+ +

In addition to freeform text, any HTML5 text-based input appears like so.

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+

Example markup

+

Given the above example form layout, here's the markup associated with the first input and control group. The .control-group, .control-label, and .controls classes are all required for styling.

 <form class="form-horizontal">
   <fieldset>
@@ -995,253 +982,241 @@ For example, <code>section</code> should be wrapped as inline.
   </fieldset>
 </form>
 
-
-

Form control states

-
-
-

Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.

-
-

Form validation

-

It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.

+

Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.

+
+

Form validation

+

It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.

 <fieldset
   class="control-group error">
   …
 </fieldset>
 
-
-
-
-
-
- -
- -
-
-
- -
- Some value here -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - Something may have gone wrong -
-
-
- -
- - Please correct the error -
-
-
- -
- - Woohoo! -
-
-
- -
- - Woohoo! -
-
-
- - -
-
-
-
-
+ +
+
+
+ +
+ +
+
+
+ +
+ Some value here +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + Something may have gone wrong +
+
+
+ +
+ + Please correct the error +
+
+
+ +
+ + Woohoo! +
+
+
+ +
+ + Woohoo! +
+
+
+ + +
+
+

Extending form controls

-
-
-

Prepend & append inputs

-

Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.

-
-

Checkboxes and radios

-

Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.

-

Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.

-
-

Inline forms and append/prepend

-

To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.

-
-

Form help text

-

To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.

-
-
-
-
-
- -
- - - - - - -

Use the same .span* classes from the grid system for input sizes.

-
+

Prepend & append inputs

+

Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.

+
+

Checkboxes and radios

+

Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.

+

Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.

+
+

Inline forms and append/prepend

+

To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.

+
+

Form help text

+

To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.

+ + +
+
+ +
+ + + + + + +

Use the same .span* classes from the grid system for input sizes.

+
+
+
+ +
+ + + +

You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).

+
+
+
+ +
+
+ @
-
- -
- - - -

You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).

-
+

Here's some help text

+
+
+
+ +
+
+ .00
-
- -
-
- @ -
-

Here's some help text

-
+ Here's more help text +
+
+
+ +
+
+ $.00
-
- -
-
- .00 -
- Here's more help text -
+
+
+
+ +
+
+
-
- -
-
- $.00 -
-
+
+
+
+ +
+
+
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
- - - -
-
-
- -
- - - -

Note: Labels surround all the options for much larger click areas and a more usable form.

-
-
-
- -
- - -
-
-
- - -
-
- -
-
+
+ +
+ +
+ + + +
+
+
+ +
+ + + +

Note: Labels surround all the options for much larger click areas and a more usable form.

+
+
+
+ +
+ + +
+
+
+ + +
+ + @@ -1299,48 +1274,44 @@ For example, <code>section</code> should be wrapped as inline. -
-
-

Buttons for actions

-

As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.

-

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.

-

Cross browser compatibility

-

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

-
-
-

Multiple sizes

-

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.

-

- - -

-

- - -

-

- - -

-
-

Disabled state

-

For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.

-

- Primary link - Link -

-

- - -

-

- Heads up! - We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. -

-
-
-

One class, multiple tags

-

Use the .btn class on an <a>, <button>, or <input> element.

+

Buttons for actions

+

As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.

+

Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.

+

Cross browser compatibility

+

IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.

+ +

Multiple sizes

+

Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.

+

+ + +

+

+ + +

+

+ + +

+
+

Disabled state

+

For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.

+

+ Primary link + Link +

+

+ + +

+

+ Heads up! + We use .disabled as a utility class here, similar to the common .active class, so no prefix is required. +

+ +

One class, multiple tags

+

Use the .btn class on an <a>, <button>, or <input> element.

Link @@ -1357,9 +1328,8 @@ For example, <code>section</code> should be wrapped as inline. <input class="btn" type="submit" value="Submit"> -

As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

-
-
+

As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.

+ @@ -1371,7 +1341,7 @@ For example, <code>section</code> should be wrapped as inline.

Icons Graciously provided by Glyphicons

-
+
  • icon-glass
  • icon-music
  • @@ -1410,7 +1380,7 @@ For example, <code>section</code> should be wrapped as inline.
  • icon-headphones
-
+
  • icon-volume-off
  • icon-volume-down
  • @@ -1449,7 +1419,7 @@ For example, <code>section</code> should be wrapped as inline.
  • icon-fast-backward
-
+
  • icon-backward
  • icon-play
  • @@ -1488,7 +1458,7 @@ For example, <code>section</code> should be wrapped as inline.
  • icon-eye-open
-
+
  • icon-eye-close
  • icon-warning-sign
  • @@ -1531,99 +1501,91 @@ For example, <code>section</code> should be wrapped as inline.
    -
    -
    -

    Built as a sprite

    -

    Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.

    -

    All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.

    -

    Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.

    -
    -
    -

    How to use

    -

    Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:

    + +

    Built as a sprite

    +

    Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.

    +

    All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.

    +

    Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.

    + +

    How to use

    +

    Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:

     <i class="icon-search"></i>
     
    -

    There are also styles available for inverted (white) icons, made ready with one extra class:

    +

    There are also styles available for inverted (white) icons, made ready with one extra class:

     <i class="icon-search icon-white"></i>
     
    -

    There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.

    -

    - Heads up! - When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing. -

    -
    -
    -

    Use cases

    -

    Icons are great, but where would one use them? Here are a few ideas:

    -
      -
    • As visuals for your sidebar navigation
    • -
    • For a purely icon-driven navigation
    • -
    • For buttons to help convey the meaning of an action
    • -
    • With links to share context on a user's destination
    • -
    -

    Essentially, anywhere you can put an <i> tag, you can put an icon.

    -
    -
    +

    There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.

    +

    + Heads up! + When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing. +

    + +

    Use cases

    +

    Icons are great, but where would one use them? Here are a few ideas:

    +
      +
    • As visuals for your sidebar navigation
    • +
    • For a purely icon-driven navigation
    • +
    • For buttons to help convey the meaning of an action
    • +
    • With links to share context on a user's destination
    • +
    +

    Essentially, anywhere you can put an <i> tag, you can put an icon.

    +

    Examples

    Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.

    -
    -
    -
    -
    - - - - -
    - -
    -

    - Refresh - Checkout - Delete -

    -

    - Comment - Settings - More Info -

    + +
    +
    + + + +
    - -
    - -
    - -
    -
    - -
    -
    -
    - +
    +

    + Refresh + Checkout + Delete +

    +

    + Comment + Settings + More Info +

    + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + diff --git a/docs/templates/pages/base-css.mustache b/docs/templates/pages/base-css.mustache index 170a4d45bb..9ef80c1254 100644 --- a/docs/templates/pages/base-css.mustache +++ b/docs/templates/pages/base-css.mustache @@ -710,29 +710,25 @@ -
    -
    -

    {{_i}}Flexible HTML and CSS{{/i}}

    -

    {{_i}}The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.{{/i}}

    -

    {{_i}}More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.{{/i}}

    -
    -
    -

    {{_i}}Four layouts included{{/i}}

    -

    {{_i}}Bootstrap comes with support for four types of form layouts:{{/i}}

    -
      -
    • {{_i}}Vertical (default){{/i}}
    • -
    • {{_i}}Search{{/i}}
    • -
    • {{_i}}Inline{{/i}}
    • -
    • {{_i}}Horizontal{{/i}}
    • -
    -

    {{_i}}Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.{{/i}}

    -
    -
    -

    {{_i}}Control states and more{{/i}}

    -

    {{_i}}Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}

    -

    {{_i}}States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.{{/i}}

    -
    -
    + +

    {{_i}}Flexible HTML and CSS{{/i}}

    +

    {{_i}}The best part about forms in Bootstrap is that all your inputs and controls look great no matter how you build them in your markup. No superfluous HTML is required, but we provide the patterns for those who require it.{{/i}}

    +

    {{_i}}More complicated layouts come with succinct and scalable classes for easy styling and event binding, so you're covered at every step.{{/i}}

    + +

    {{_i}}Four layouts included{{/i}}

    +

    {{_i}}Bootstrap comes with support for four types of form layouts:{{/i}}

    +
      +
    • {{_i}}Vertical (default){{/i}}
    • +
    • {{_i}}Search{{/i}}
    • +
    • {{_i}}Inline{{/i}}
    • +
    • {{_i}}Horizontal{{/i}}
    • +
    +

    {{_i}}Different types of form layouts require some changes to markup, but the controls themselves remain and behave the same.{{/i}}

    + +

    {{_i}}Control states and more{{/i}}

    +

    {{_i}}Bootstrap's forms include styles for all the base form controls like input, textarea, and select you'd expect. But it also comes with a number of custom components like appended and prepended inputs and support for lists of checkboxes.{{/i}}

    +

    {{_i}}States like error, warning, and success are included for each type of form control. Also included are styles for disabled controls.{{/i}}

    +

    {{_i}}Four types of forms{{/i}}

    {{_i}}Bootstrap provides simple markup and styles for four styles of common web forms.{{/i}}

    @@ -770,19 +766,17 @@

    {{_i}}Example forms using just form controls, no extra markup{{/i}}

    -
    -
    -

    {{_i}}Basic form{{/i}}

    -

    {{_i}}Smart and lightweight defaults without extra markup.{{/i}}

    -
    - - -

    {{_i}}Example block-level help text here.{{/i}}

    - - -
    +

    {{_i}}Basic form{{/i}}

    +

    {{_i}}Smart and lightweight defaults without extra markup.{{/i}}

    +
    + + +

    {{_i}}Example block-level help text here.{{/i}}

    + + +
     <form class="well">
       <label>{{_i}}Label name{{/i}}</label>
    @@ -794,14 +788,13 @@
       <button type="submit" class="btn">{{_i}}Submit{{/i}}</button>
     </form>
     
    -
    -
    -

    {{_i}}Search form{{/i}}

    -

    {{_i}}Add .form-search to the form and .search-query to the input.{{/i}}

    - + +

    {{_i}}Search form{{/i}}

    +

    {{_i}}Add .form-search to the form and .search-query to the input.{{/i}}

    +
     <form class="well form-search">
       <input type="text" class="input-medium search-query">
    @@ -809,16 +802,16 @@
     </form>
     
    -

    {{_i}}Inline form{{/i}}

    -

    {{_i}}Add .form-inline to finesse the vertical alignment and spacing of form controls.{{/i}}

    -
    - - - - -
    +

    {{_i}}Inline form{{/i}}

    +

    {{_i}}Add .form-inline to finesse the vertical alignment and spacing of form controls.{{/i}}

    +
    + + + + +
     <form class="well form-inline">
       <input type="text" class="input-small" placeholder="{{_i}}Email{{/i}}">
    @@ -829,89 +822,83 @@
       <button type="submit" class="btn">{{_i}}Sign in{{/i}}</button>
     </form>
     
    -
    -

    {{_i}}Horizontal forms{{/i}}

    -
    -
    -

    {{_i}}{{/i}}

    -

    {{_i}}Shown on the right are all the default form controls we support. Here's the bulleted list:{{/i}}

    -
      -
    • {{_i}}text inputs (text, password, email, etc){{/i}}
    • -
    • {{_i}}checkbox{{/i}}
    • -
    • {{_i}}radio{{/i}}
    • -
    • {{_i}}select{{/i}}
    • -
    • {{_i}}multiple select{{/i}}
    • -
    • {{_i}}file input{{/i}}
    • -
    • {{_i}}textarea{{/i}}
    • -
    -
    -
    -
    -
    -
    - -
    - -

    {{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - - -
    -
    -
    -

    {{_i}}Example markup{{/i}}

    -

    {{_i}}Given the above example form layout, here's the markup associated with the first input and control group. The .control-group, .control-label, and .controls classes are all required for styling.{{/i}}

    +

    {{_i}}Shown on the right are all the default form controls we support. Here's the bulleted list:{{/i}}

    +
      +
    • {{_i}}text inputs (text, password, email, etc){{/i}}
    • +
    • {{_i}}checkbox{{/i}}
    • +
    • {{_i}}radio{{/i}}
    • +
    • {{_i}}select{{/i}}
    • +
    • {{_i}}multiple select{{/i}}
    • +
    • {{_i}}file input{{/i}}
    • +
    • {{_i}}textarea{{/i}}
    • +
    + +
    +
    +
    + +
    + +

    {{_i}}In addition to freeform text, any HTML5 text-based input appears like so.{{/i}}

    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    +

    {{_i}}Example markup{{/i}}

    +

    {{_i}}Given the above example form layout, here's the markup associated with the first input and control group. The .control-group, .control-label, and .controls classes are all required for styling.{{/i}}

     <form class="form-horizontal">
       <fieldset>
    @@ -926,253 +913,241 @@
       </fieldset>
     </form>
     
    -
    -

    {{_i}}Form control states{{/i}}

    -
    -
    -

    {{_i}}Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.{{/i}}

    -
    -

    {{_i}}Form validation{{/i}}

    -

    {{_i}}It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.{{/i}}

    +

    {{_i}}Bootstrap features styles for browser-supported focused and disabled states. We remove the default Webkit outline and apply a box-shadow in its place for :focus.{{/i}}

    +
    +

    {{_i}}Form validation{{/i}}

    +

    {{_i}}It also includes validation styles for errors, warnings, and success. To use, add the error class to the surrounding .control-group.{{/i}}

     <fieldset
       class="control-group error">
       …
     </fieldset>
     
    -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    - Some value here -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - - {{_i}}Something may have gone wrong{{/i}} -
    -
    -
    - -
    - - {{_i}}Please correct the error{{/i}} -
    -
    -
    - -
    - - {{_i}}Woohoo!{{/i}} -
    -
    -
    - -
    - - {{_i}}Woohoo!{{/i}} -
    -
    -
    - - -
    -
    -
    -
    -
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + Some value here +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + {{_i}}Something may have gone wrong{{/i}} +
    +
    +
    + +
    + + {{_i}}Please correct the error{{/i}} +
    +
    +
    + +
    + + {{_i}}Woohoo!{{/i}} +
    +
    +
    + +
    + + {{_i}}Woohoo!{{/i}} +
    +
    +
    + + +
    +
    +

    {{_i}}Extending form controls{{/i}}

    -
    -
    -

    {{_i}}Prepend & append inputs{{/i}}

    -

    {{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}

    -
    -

    {{_i}}Checkboxes and radios{{/i}}

    -

    {{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.{{/i}}

    -

    {{_i}}Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.{{/i}}

    -
    -

    {{_i}}Inline forms and append/prepend{{/i}}

    -

    {{_i}}To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.{{/i}}

    -
    -

    {{_i}}Form help text{{/i}}

    -

    {{_i}}To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.{{/i}}

    -
    -
    -
    -
    -
    - -
    - - - - - - -

    {{_i}}Use the same .span* classes from the grid system for input sizes.{{/i}}

    -
    +

    {{_i}}Prepend & append inputs{{/i}}

    +

    {{_i}}Input groups—with appended or prepended text—provide an easy way to give more context for your inputs. Great examples include the @ sign for Twitter usernames or $ for finances.{{/i}}

    +
    +

    {{_i}}Checkboxes and radios{{/i}}

    +

    {{_i}}Up to v1.4, Bootstrap required extra markup around checkboxes and radios to stack them. Now, it's a simple matter of repeating the <label class="checkbox"> that wraps the <input type="checkbox">.{{/i}}

    +

    {{_i}}Inline checkboxes and radios are also supported. Just add .inline to any .checkbox or .radio and you're done.{{/i}}

    +
    +

    {{_i}}Inline forms and append/prepend{{/i}}

    +

    {{_i}}To use prepend or append inputs in an inline form, be sure to place the .add-on and input on the same line, without spaces.{{/i}}

    +
    +

    {{_i}}Form help text{{/i}}

    +

    {{_i}}To add help text for your form inputs, include inline help text with <span class="help-inline"> or a help text block with <p class="help-block"> after the input element.{{/i}}

    + + +
    +
    + +
    + + + + + + +

    {{_i}}Use the same .span* classes from the grid system for input sizes.{{/i}}

    +
    +
    +
    + +
    + + + +

    {{_i}}You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).{{/i}}

    +
    +
    +
    + +
    +
    + @
    -
    - -
    - - - -

    {{_i}}You may also use static classes that don't map to the grid, adapt to the responsive CSS styles, or account for varying types of controls (e.g., input vs. select).{{/i}}

    -
    +

    {{_i}}Here's some help text{{/i}}

    +
    +
    +
    + +
    +
    + .00
    -
    - -
    -
    - @ -
    -

    {{_i}}Here's some help text{{/i}}

    -
    + {{_i}}Here's more help text{{/i}} +
    +
    +
    + +
    +
    + $.00
    -
    - -
    -
    - .00 -
    - {{_i}}Here's more help text{{/i}} -
    +
    +
    +
    + +
    +
    +
    -
    - -
    -
    - $.00 -
    -
    +
    +
    +
    + +
    +
    +
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -

    {{_i}}Note: Labels surround all the options for much larger click areas and a more usable form.{{/i}}

    -
    -
    -
    - -
    - - -
    -
    -
    - - -
    -
    - -
    -
    +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +

    {{_i}}Note: Labels surround all the options for much larger click areas and a more usable form.{{/i}}

    +
    +
    +
    + +
    + + +
    +
    +
    + + +
    + + @@ -1230,48 +1205,44 @@ -
    -
    -

    {{_i}}Buttons for actions{{/i}}

    -

    {{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}

    -

    {{_i}}Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.{{/i}}

    -

    {{_i}}Cross browser compatibility{{/i}}

    -

    {{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}

    -
    -
    -

    {{_i}}Multiple sizes{{/i}}

    -

    {{_i}}Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.{{/i}}

    -

    - - -

    -

    - - -

    -

    - - -

    -
    -

    {{_i}}Disabled state{{/i}}

    -

    {{_i}}For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.{{/i}}

    -

    - {{_i}}Primary link{{/i}} - {{_i}}Link{{/i}} -

    -

    - - -

    -

    - {{_i}}Heads up!{{/i}} - {{_i}}We use .disabled as a utility class here, similar to the common .active class, so no prefix is required.{{/i}} -

    -
    -
    -

    {{_i}}One class, multiple tags{{/i}}

    -

    {{_i}}Use the .btn class on an <a>, <button>, or <input> element.{{/i}}

    +

    {{_i}}Buttons for actions{{/i}}

    +

    {{_i}}As a convention, buttons should only be used for actions while hyperlinks are to be used for objects. For instance, "Download" should be a button while "recent activity" should be a link.{{/i}}

    +

    {{_i}}Button styles can be applied to anything with the .btn class applied. However, typically you'll want to apply these to only <a> and <button> elements.{{/i}}

    +

    {{_i}}Cross browser compatibility{{/i}}

    +

    {{_i}}IE9 doesn't crop background gradients on rounded corners, so we remove it. Related, IE9 jankifies disabled button elements, rendering text gray with a nasty text-shadow that we cannot fix.{{/i}}

    + +

    {{_i}}Multiple sizes{{/i}}

    +

    {{_i}}Fancy larger or smaller buttons? Add .btn-large, .btn-small, or .btn-mini for two additional sizes.{{/i}}

    +

    + + +

    +

    + + +

    +

    + + +

    +
    +

    {{_i}}Disabled state{{/i}}

    +

    {{_i}}For disabled buttons, add the .disabled class to links and the disabled attribute for <button> elements.{{/i}}

    +

    + {{_i}}Primary link{{/i}} + {{_i}}Link{{/i}} +

    +

    + + +

    +

    + {{_i}}Heads up!{{/i}} + {{_i}}We use .disabled as a utility class here, similar to the common .active class, so no prefix is required.{{/i}} +

    + +

    {{_i}}One class, multiple tags{{/i}}

    +

    {{_i}}Use the .btn class on an <a>, <button>, or <input> element.{{/i}}

    {{_i}}Link{{/i}} @@ -1288,9 +1259,8 @@ <input class="btn" type="submit" value="{{_i}}Submit{{/i}}"> -

    {{_i}}As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.{{/i}}

    -
    -
    +

    {{_i}}As a best practice, try to match the element for you context to ensure matching cross-browser rendering. If you have an input, use an <input type="submit"> for your button.{{/i}}

    + @@ -1302,7 +1272,7 @@

    {{_i}}Icons Graciously provided by Glyphicons{{/i}}

    -
    +
    • icon-glass
    • icon-music
    • @@ -1341,7 +1311,7 @@
    • icon-headphones
    -
    +
    • icon-volume-off
    • icon-volume-down
    • @@ -1380,7 +1350,7 @@
    • icon-fast-backward
    -
    +
    • icon-backward
    • icon-play
    • @@ -1419,7 +1389,7 @@
    • icon-eye-open
    -
    +
    • icon-eye-close
    • icon-warning-sign
    • @@ -1462,97 +1432,89 @@
      -
      -
      -

      {{_i}}Built as a sprite{{/i}}

      -

      {{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}

      -

      {{_i}}All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.{{/i}}

      -

      {{_i}}Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.{{/i}}

      -
      -
      -

      {{_i}}How to use{{/i}}

      -

      {{_i}}Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:{{/i}}

      + +

      {{_i}}Built as a sprite{{/i}}

      +

      {{_i}}Instead of making every icon an extra request, we've compiled them into a sprite—a bunch of images in one file that uses CSS to position the images with background-position. This is the same method we use on Twitter.com and it has worked well for us.{{/i}}

      +

      {{_i}}All icons classes are prefixed with .icon- for proper namespacing and scoping, much like our other components. This will help avoid conflicts with other tools.{{/i}}

      +

      {{_i}}Glyphicons has granted us use of the Halflings set in our open-source toolkit so long as we provide a link and credit here in the docs. Please consider doing the same in your projects.{{/i}}

      + +

      {{_i}}How to use{{/i}}

      +

      {{_i}}Bootstrap uses an <i> tag for all icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere:{{/i}}

       <i class="icon-search"></i>
       
      -

      {{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}

      +

      {{_i}}There are also styles available for inverted (white) icons, made ready with one extra class:{{/i}}

       <i class="icon-search icon-white"></i>
       
      -

      {{_i}}There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}

      -

      - {{_i}}Heads up!{{/i}} - {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.{{/i}} -

      -
      -
      -

      {{_i}}Use cases{{/i}}

      -

      {{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}

      -
        -
      • {{_i}}As visuals for your sidebar navigation{{/i}}
      • -
      • {{_i}}For a purely icon-driven navigation{{/i}}
      • -
      • {{_i}}For buttons to help convey the meaning of an action{{/i}}
      • -
      • {{_i}}With links to share context on a user's destination{{/i}}
      • -
      -

      {{_i}}Essentially, anywhere you can put an <i> tag, you can put an icon.{{/i}}

      -
      -
      +

      {{_i}}There are 140 classes to choose from for your icons. Just add an <i> tag with the right classes and you're set. You can find the full list in sprites.less or right here in this document.{{/i}}

      +

      + {{_i}}Heads up!{{/i}} + {{_i}}When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i> tag for proper spacing.{{/i}} +

      + +

      {{_i}}Use cases{{/i}}

      +

      {{_i}}Icons are great, but where would one use them? Here are a few ideas:{{/i}}

      +
        +
      • {{_i}}As visuals for your sidebar navigation{{/i}}
      • +
      • {{_i}}For a purely icon-driven navigation{{/i}}
      • +
      • {{_i}}For buttons to help convey the meaning of an action{{/i}}
      • +
      • {{_i}}With links to share context on a user's destination{{/i}}
      • +
      +

      {{_i}}Essentially, anywhere you can put an <i> tag, you can put an icon.{{/i}}

      +

      {{_i}}Examples{{/i}}

      {{_i}}Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.{{/i}}

      -