From e8bd019a19a82b2796b77101cb43892138f4935e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 10 Jul 2014 20:02:47 -0700 Subject: move all css files over to components dir --- docs/_includes/css/buttons.md | 125 ----- docs/_includes/css/code.md | 68 --- docs/_includes/css/forms.html | 805 --------------------------- docs/_includes/css/grid.md | 455 --------------- docs/_includes/css/helpers.md | 228 -------- docs/_includes/css/images.md | 40 -- docs/_includes/css/overview.md | 86 --- docs/_includes/css/responsive-utilities.html | 256 --------- docs/_includes/css/tables.html | 458 --------------- docs/_includes/css/type.md | 385 ------------- 10 files changed, 2906 deletions(-) delete mode 100644 docs/_includes/css/buttons.md delete mode 100644 docs/_includes/css/code.md delete mode 100644 docs/_includes/css/forms.html delete mode 100644 docs/_includes/css/grid.md delete mode 100644 docs/_includes/css/helpers.md delete mode 100644 docs/_includes/css/images.md delete mode 100644 docs/_includes/css/overview.md delete mode 100644 docs/_includes/css/responsive-utilities.html delete mode 100644 docs/_includes/css/tables.html delete mode 100644 docs/_includes/css/type.md (limited to 'docs/_includes/css') diff --git a/docs/_includes/css/buttons.md b/docs/_includes/css/buttons.md deleted file mode 100644 index c02e74e1f..000000000 --- a/docs/_includes/css/buttons.md +++ /dev/null @@ -1,125 +0,0 @@ - - -# Buttons - -Use any of the available button classes to quickly create a styled button. - -{% example html %} - - - - - - - - - - - - - - - - - -{% endexample %} - - - - - -## Sizes - -Fancy larger or smaller buttons? Add `.btn-lg`, `.btn-sm`, or `.btn-xs` for additional sizes. - -{% example html %} - - -{% endexample %} - -{% example html %} - - -{% endexample %} - -{% example html %} - - -{% endexample %} - -Create block level buttons—those that span the full width of a parent—by adding `.btn-block`. - -{% example html %} - - -{% endexample %} - - - - - -## Active state - -Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. **There's no need to add a class to ` - -{% endexample %} - -As `` elements don't support the `disabled` attribute, you must add the `.disabled` class to fake it. - -{% example html %} -Primary link -Link -{% endexample %} - -
-

Cross-browser compatibility

-

If you add the disabled attribute to a <button>, Internet Explorer 9 and below will render text gray with a nasty text-shadow that we cannot fix.

-
- -
-

Link functionality caveat

-

This class uses pointer-events: none to try to disable the link functionality of <a>s, 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.

-
- -
-

Context-specific usage

-

While button classes can be used on <a> and <button> elements, only <button> elements are supported within our nav and navbar components.

-
- - - - - -## Button tags - -Use the button classes on an ``, ` - - -{% endexample %} - - -
-

Cross-browser rendering

-

As a best practice, we highly recommend using the <button> element whenever possible to ensure matching cross-browser rendering.

-

Among other things, there's a bug in Firefox <30 that prevents us from setting the line-height of <input>-based buttons, causing them to not exactly match the height of other buttons on Firefox.

-
diff --git a/docs/_includes/css/code.md b/docs/_includes/css/code.md deleted file mode 100644 index 965b4bbc0..000000000 --- a/docs/_includes/css/code.md +++ /dev/null @@ -1,68 +0,0 @@ - - -# Code - -Styles for inline code snippets and longer, multiline blocks of code. - - - - - -## Inline code - -Wrap inline snippets of code with `code`. Be sure to escape HTML angle brackets. - -{% example html %} -For example, <section> should be wrapped as inline. -{% endexample %} - - - - - -## User input - -Use the `` to indicate input that is typically entered via keyboard. - -{% example html %} -To switch directories, type cd followed by the name of the directory.
-To edit settings, press ctrl + , -{% endexample %} - - - - - -## Preformatted text - -Or, code blocks. Use `
`s for multiple lines of code. Once again, be sure to escape any angle brackets in the code for proper rendering.
-
-{% example html %}
-
<p>Sample text here...</p>
-{% endexample %} - -You may optionally add the `.pre-scrollable` class, which will set a max-height of 350px and provide a y-axis scrollbar. - - - - - -## Variables - -For indicating variables use the `` tag. - -{% example html %} -y = mx + b -{% endexample %} - - - - - -## Sample output - -For indicating blocks sample output from a program use the `` tag. - -{% example html %} -This text is meant to be treated as sample output from a computer program. -{% endexample %} diff --git a/docs/_includes/css/forms.html b/docs/_includes/css/forms.html deleted file mode 100644 index 6192c6d80..000000000 --- a/docs/_includes/css/forms.html +++ /dev/null @@ -1,805 +0,0 @@ -
-

Forms

- -

Basic example

-

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 block-level help text here.

-
-
- -
- -
-
-{% highlight html %} -
-
- - -
-
- - -
-
- - -

Example block-level help text here.

-
-
- -
- -
-{% endhighlight %} -
-

Don't mix form groups with input groups

-

Do not mix form groups directly with input groups. Instead, nest the input group inside of the form group.

-
- - -

Inline form

-

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.

-
-

Requires custom widths

-

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.

-
-
-

Always add labels

-

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.

-
-
-
-
- - -
-
-
-
@
- -
-
-
- - -
-
- -
- -
-
-{% highlight html %} -
-
- - -
-
-
-
@
- -
-
-
- - -
-
- -
- -
-{% endhighlight %} - - -

Horizontal form

-

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-groups to behave as grid rows, so no need for .row.

-
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-{% highlight html %} -
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-{% endhighlight %} - - -

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.

-
-

Type declaration required

-

Inputs will only be fully styled if their type is properly declared.

-
-
-
- -
-
-{% highlight html %} - -{% endhighlight %} -
-

Input groups

-

To add integrated text or buttons before and/or after any text-based <input>, check out the input group component.

-
- -

Textarea

-

Form control which supports multiple lines of text. Change rows attribute as necessary.

-
-
- -
-
-{% highlight html %} - -{% endhighlight %} - -

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)

-
-
-
- -
-
- -
-
-
- -
-
- -
-
- -
-
-
-{% highlight html %} -
- -
-
- -
- -
- -
-
- -
-
- -
-{% endhighlight %} - -

Inline checkboxes and radios

-

Use the .checkbox-inline or .radio-inline classes on a series of checkboxes or radios for controls that appear on the same line.

-
-
- - - -
-
-
- - - -
-
-{% highlight html %} - - - - - - - -{% endhighlight %} - -

Selects

-

Use the default option, or add multiple to show multiple options at once.

-
-
- -
- -
-
-{% highlight html %} - - - -{% endhighlight %} - - -

Static control

-

When you need to place plain text next to a form label within a horizontal form, use the .form-control-static class on a <p>.

-
-
-
- -
-

email@example.com

-
-
-
- -
- -
-
-
-
-{% highlight html %} -
-
- -
-

email@example.com

-
-
-
- -
- -
-
-
-{% endhighlight %} - -

Input focus

-

We remove the default outline styles on some form controls and apply a box-shadow in its place for :focus.

-
-
- -
-
-
-

Demo :focus state

-

The above example input uses custom styles in our documentation to demonstrate the :focus state on a .form-control.

-
- - -

Disabled inputs

-

Add the disabled boolean attribute on an input to prevent user input and trigger a slightly different look.

-
-
- -
-
-{% highlight html %} - -{% endhighlight %} - -

Disabled fieldsets

-

Add the disabled attribute to a <fieldset> to disable all the controls within the <fieldset> at once.

- -
-

Caveat about link functionality of <a>

-

Our styles use pointer-events: none to try to disable the link functionality of <a class="btn btn-*"> 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.

-
- -
-

Cross-browser compatibility

-

While Bootstrap will apply these styles in all browsers, Internet Explorer 9 and below don't actually support the disabled attribute on a <fieldset>. Use custom JavaScript to disable the fieldset in these browsers.

-
- -
-
-
-
- - -
-
- - -
-
- -
- -
-
-
-{% highlight html %} -
-
-
- - -
-
- - -
-
- -
- -
-
-{% endhighlight %} - - -

Readonly inputs

-

Add the readonly boolean attribute on an input to prevent user input and style the input as disabled.

-
-
- -
-
-{% highlight html %} - -{% endhighlight %} - - -

Validation states

-

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.

- -
-
-
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
-
-{% highlight html %} -
- - -
-
- - -
-
- - -
-
-
- -
-
-
-
- -
-
-
-
- -
-
-{% endhighlight %} - -

With optional icons

-

You can also add optional feedback icons with the addition of .has-feedback and the right icon.

-
-

Icons, labels, and input groups

-

Manual positioning of feedback icons is required for inputs without a label and for input groups 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.

-
-
-
-
- - - -
-
- - - -
-
- - - -
-
-
-{% highlight html %} -
- - - -
-
- - - -
-
- - - -
-{% endhighlight %} - -

Optional icons in horizontal and inline forms

-
-
-
- -
- - -
-
-
-
-{% highlight html %} -
-
- -
- - -
-
-
-{% endhighlight %} - -
-
-
- - - -
-
-
-{% highlight html %} -
-
- - - -
-
-{% endhighlight %} - -

Optional icons with hidden .sr-only labels

-

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.

-
-
- - - -
-
-{% highlight html %} -
- - - -
-{% endhighlight %} - - -

Control sizing

-

Set heights using classes like .input-lg, and set widths using grid column classes like .col-lg-*.

- -

Height sizing

-

Create taller or shorter form controls that match button sizes.

-
-
-
- - - - - - - -
-
-
-{% highlight html %} - - - - - - - -{% endhighlight %} - -

Horizontal form group sizes

-

Quickly size labels and form controls within .form-horizontal by adding .form-group-lg or .form-group-sm.

-
-
-
- -
- -
-
-
- -
- -
-
-
-
-{% highlight html %} -
-
- -
- -
-
-
- -
- -
-
-
-{% endhighlight %} - - -

Column sizing

-

Wrap inputs in grid columns, or any custom parent element, to easily enforce desired widths.

-
-
-
-
- -
-
- -
-
- -
-
-
-
-{% highlight html %} -
-
- -
-
- -
-
- -
-
-{% endhighlight %} - -

Help text

-

Block level help text for form controls.

-
-
- - A block of help text that breaks onto a new line and may extend beyond one line. -
-
-{% highlight html %} -A block of help text that breaks onto a new line and may extend beyond one line. -{% endhighlight %} -
diff --git a/docs/_includes/css/grid.md b/docs/_includes/css/grid.md deleted file mode 100644 index 7942e813e..000000000 --- a/docs/_includes/css/grid.md +++ /dev/null @@ -1,455 +0,0 @@ - - -# Grid system - -Bootstrap includes a responsive, mobile first fluid grid system that appropriately scales up to 12 columns as the device or viewport size increases. It includes [predefined classes](#grid-example-basic) for easy layout options, as well as powerful [mixins for generating more semantic layouts](#grid-semantic). - - - - - -### Introduction - -Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here's how the Bootstrap grid system works: - -- Rows must be placed within a `.container` (fixed-width) or `.container-fluid` (full-width) for proper alignment and padding. -- Use rows to create horizontal groups of columns. -- Content should be placed within columns, and only columns may be immediate children of rows. -- Predefined grid classes like `.row` and `.col-xs-4` are available for quickly making grid layouts. Less mixins can also be used for more semantic layouts. -- Columns create gutters (gaps between column content) via `padding`. That padding is offset in rows for the first and last column via negative margin on `.row`s. -- 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. -- Grid columns are created by specifying the number of twelve available columns you wish to span. For example, three equal columns would use three `.col-xs-4`. -- 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. -- 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 `.col-md-` class to an element will not only affect its styling on medium devices but also on large devices if a `.col-lg-` class is not present. - -Look to the examples for applying these principles to your code. - - - - - -### Media queries - -We use the following media queries in our Less files to create the key breakpoints in our grid system. - -{% highlight scss %} -/* Extra small devices (phones, less than 768px) */ -/* No media query since this is the default in Bootstrap */ - -/* Small devices (tablets, 768px and up) */ -@media (min-width: @screen-sm-min) { ... } - -/* Medium devices (desktops, 992px and up) */ -@media (min-width: @screen-md-min) { ... } - -/* Large devices (large desktops, 1200px and up) */ -@media (min-width: @screen-lg-min) { ... } -{% endhighlight %} - -We occasionally expand on these media queries to include a max-width to limit CSS to a narrower set of devices. - -{% highlight scss %} -@media (max-width: @screen-xs-max) { ... } -@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { ... } -@media (min-width: @screen-md-min) and (max-width: @screen-md-max) { ... } -@media (min-width: @screen-lg-min) { ... } -{% endhighlight %} - - - - - -### Grid options - -See how aspects of the Bootstrap grid system work across multiple devices with a handy table. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Extra small devices - Phones (<768px) - - Small devices - Tablets (≥768px) - - Medium devices - Desktops (≥992px) - - Large devices - Desktops (≥1200px) -
Grid behaviorHorizontal at all timesCollapsed to start, horizontal above breakpoints
Container widthNone (auto)750px970px1170px
Class prefix.col-xs-.col-sm-.col-md-.col-lg-
# of columns12
Column widthAuto~62px~81px~97px
Gutter width30px (15px on each side of a column)
NestableYes
OffsetsYes
Column orderingYes
-
- - - - - -### Example: Semantic grid mixins - -In addition to [prebuilt grid classes](#grid-example-basic) for fast layouts, Bootstrap includes Less variables and mixins for quickly generating your own simple, semantic layouts. - -#### Variables - -Variables determine the number of columns, the gutter width, and the media query point at which to begin floating columns. We use these to generate the predefined grid classes documented above, as well as for the custom mixins listed below. - -{% highlight scss %} -@grid-columns: 12; -@grid-gutter-width: 1.5rem; -{% endhighlight %} - -#### Mixins - -Mixins are used in conjunction with the grid variables to generate semantic CSS for individual grid columns. - -{% highlight scss %} -// Creates a wrapper for a series of columns -.make-row(@gutter: @grid-gutter-width) { - margin-left: (@gutter / -2); - margin-right: (@gutter / -2); - &:extend(.clearfix all); -} - -// Make the element grid-ready (applying everything but the width) -.make-col(@gutter: @grid-gutter-width) { - position: relative; - float: left; - min-height: 1px; - padding-left: (@gutter / 2); - padding-right: (@gutter / 2); -} - -// Set a width (to be used in or out of media queries) -.make-col-span(@columns) { - width: percentage((@columns / @grid-columns)); -} - -// Get fancy by offsetting, or changing the sort order -.make-col-offset(@columns) { - margin-left: percentage((@columns / @grid-columns)); -} -.make-col-push(@columns) { - left: percentage((@columns / @grid-columns)); -} -.make-col-pull(@columns) { - right: percentage((@columns / @grid-columns)); -} -{% endhighlight %} - -#### Example usage - -You can modify the variables to your own custom values, or just use the mixins with their default values. Here's an example of using the default settings to create a two-column layout with a gap between. - -See it in action in this rendered example. - -{% highlight scss %} -.container { - max-width: 60em; - .make-container(); -} -.row { - .make-row(); -} -.content-main { - .make-col(); - - @media (max-width: 32em) { - .make-col-span(6); - } - @media (min-width: 32.1em) { - .make-col-span(8); - } -} -.content-secondary { - .make-col(); - - @media (max-width: 32em) { - .make-col-span(6); - } - @media (min-width: 32.1em) { - .make-col-span(4); - } -} -{% endhighlight %} - -{% highlight html %} -
-
-
...
-
...
-
-
-{% endhighlight %} - - - - - -### Example: Stacked-to-horizontal - -Using a single set of `.col-md-*` grid classes, you can create a basic grid system that starts out stacked on mobile devices and tablet devices (the extra small to small range) before becoming horizontal on desktop (medium) devices. Place grid columns in any `.row`. - -{% example html %} -
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
.col-md-1
-
-
-
.col-md-8
-
.col-md-4
-
-
-
.col-md-4
-
.col-md-4
-
.col-md-4
-
-
-
.col-md-6
-
.col-md-6
-
-{% endexample %} - - - - - -### Example: Fluid container - -Turn any fixed-width grid layout into a full-width layout by changing your outermost `.container` to `.container-fluid`. - -{% highlight html %} -
-
- ... -
-
-{% endhighlight %} - - - - - -### Example: Mobile and desktop - -Don't want your columns to simply stack in smaller devices? Use the extra small and medium device grid classes by adding `.col-xs-*` and `.col-md-*` to your columns. See the example below for a better idea of how it all works. - -{% example html %} - -
-
.col-xs-12 .col-md-8
-
.col-xs-6 .col-md-4
-
- - -
-
.col-xs-6 .col-md-4
-
.col-xs-6 .col-md-4
-
.col-xs-6 .col-md-4
-
- - -
-
.col-xs-6
-
.col-xs-6
-
-{% endexample %} - - - - - -### Example: Mobile, tablet, desktops - -Build on the previous example by creating even more dynamic and powerful layouts with tablet `.col-sm-*` classes. - -{% example html %} -
-
.col-xs-12 .col-sm-6 .col-md-8
-
.col-xs-6 .col-md-4
-
-
-
.col-xs-6 .col-sm-4
-
.col-xs-6 .col-sm-4
- -
-
.col-xs-6 .col-sm-4
-
-{% endexample %} - - - - - -### Example: Column wrapping - -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. - -{% example html %} -
-
.col-xs-9
-
.col-xs-4
Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.
-
.col-xs-6
Subsequent columns continue along the new line.
-
-{% endexample %} - - - - - -### Example: Responsive column resets - -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 `.clearfix` and our [responsive utility classes](#responsive-utilities). - -{% example html %} -
-
.col-xs-6 .col-sm-3
-
.col-xs-6 .col-sm-3
- - -
- -
.col-xs-6 .col-sm-3
-
.col-xs-6 .col-sm-3
-
-{% endexample %} - -In addition to column clearing at responsive breakpoints, you may need to **reset offsets, pushes, or pulls**. See this in action in [the grid example](../examples/grid/). - -{% example html %} -
-
.col-sm-5 .col-md-6
-
.col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0
-
- -
-
.col-sm-6 .col-md-5 .col-lg-6
-
.col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0
-
-{% endexample %} - - - - - -### Example: Offsetting columns - -Move columns to the right using `.col-md-offset-*` classes. These classes increase the left margin of a column by `*` columns. For example, `.col-md-offset-4` moves `.col-md-4` over four columns. - -{% example html %} -
-
.col-md-4
-
.col-md-4 .col-md-offset-4
-
-
-
.col-md-3 .col-md-offset-3
-
.col-md-3 .col-md-offset-3
-
-
-
.col-md-6 .col-md-offset-3
-
-{% endexample %} - - - - - -### Example: Nesting columns - -To nest your content with the default grid, add a new `.row` and set of `.col-sm-*` columns within an existing `.col-sm-*` 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). - -{% example html %} -
-
- Level 1: .col-sm-9 -
-
- Level 2: .col-xs-8 .col-sm-6 -
-
- Level 2: .col-xs-4 .col-sm-6 -
-
-
-
-{% endexample %} - - - - - -### Example: Column ordering - -Easily change the order of our built-in grid columns with `.col-md-push-*` and `.col-md-pull-*` modifier classes. - -{% example html %} -
-
.col-md-9 .col-md-push-3
-
.col-md-3 .col-md-pull-9
-
-{% endexample %} diff --git a/docs/_includes/css/helpers.md b/docs/_includes/css/helpers.md deleted file mode 100644 index 24f9a027a..000000000 --- a/docs/_includes/css/helpers.md +++ /dev/null @@ -1,228 +0,0 @@ - - -# Helper classes - - - - - -### Contextual colors - -Convey meaning through color with a handful of emphasis utility classes. These may also be applied to links and will darken on hover just like our default link styles. - -{% example html %} -

Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.

-

Nullam id dolor id nibh ultricies vehicula ut id elit.

-

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

-

Maecenas sed diam eget risus varius blandit sit amet non magna.

-

Etiam porta sem malesuada magna mollis euismod.

-

Donec ullamcorper nulla non metus auctor fringilla.

-{% endexample %} - -
-

Dealing with specificity

-

Sometimes emphasis classes cannot be applied due to the specificity of another selector. In most cases, a sufficient workaround is to wrap your text in a <span> with the class.

-
- - - - - -### Contextual backgrounds - -Similar to the contextual text color classes, easily set the background of an element to any contextual class. Anchor components will darken on hover, just like the text classes. - -{% example html %} -
Nullam id dolor id nibh ultricies vehicula ut id elit.
-
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
-
Maecenas sed diam eget risus varius blandit sit amet non magna.
-
Etiam porta sem malesuada magna mollis euismod.
-
Donec ullamcorper nulla non metus auctor fringilla.
-{% endexample %} - -
-

Dealing with specificity

-

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 <div> with the class.

-
- - - - - -### Close icon - -Use a generic close icon for dismissing content like modals and alerts. **Be sure to include screen reader text when you can** as we've done with `.sr-only`. - -{% example html %} - -{% endexample %} - - - - - -### Quick floats - -Float an element to the left or right with a class. `!important` is included to avoid specificity issues. Classes can also be used as mixins. - -{% example html %} -
...
-
...
-{% endexample %} - -{% highlight scss %} -// Classes -.pull-left { - float: left !important; -} -.pull-right { - float: right !important; -} - -// Usage as mixins -.element { - .pull-left(); -} -.another-element { - .pull-right(); -} -{% endhighlight %} - -
-

Not for use in navbars

-

To align components in navbars with utility classes, use .navbar-left or .navbar-right instead. See the navbar docs for details.

-
- - - - - -### Center content blocks - -Set an element to `display: block;` and center via `margin`. Available as a mixin and class. - -{% example html %} -
...
-{% endexample %} - -{% highlight scss %} -// Classes -.center-block { - display: block; - margin-left: auto; - margin-right: auto; -} - -// Usage as mixins -.element { - .center-block(); -} -{% endhighlight %} - - - - - -Easily clear `float`s by adding `.clearfix` **to the parent element**. Utilizes [the micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/) as popularized by Nicolas Gallagher. Can also be used as a mixin. - -{% highlight html %} -
...
-{% endhighlight %} - -{% highlight scss %} -// Mixin itself -.clearfix() { - &:before, - &:after { - content: " "; - display: table; - } - &:after { - clear: both; - } -} - -// Usage as a Mixin -.element { - .clearfix(); -} -{% endhighlight %} - - - - - -### Showing and hiding content - -Force an element to be shown or hidden (**including for screen readers**) with the use of `.show` and `.hidden` classes. These classes use `!important` to avoid specificity conflicts, just like the [quick floats](#helper-floats). They are only available for block level toggling. They can also be used as mixins. - -Furthermore, `.invisible` can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document. - -{% highlight html %} -
...
- -{% endhighlight %} - -{% highlight scss %} -// Classes -.show { - display: block !important; -} -.hidden { - display: none !important; - visibility: hidden !important; -} -.invisible { - visibility: hidden; -} - -// Usage as mixins -.element { - .show(); -} -.another-element { - .hidden(); -} -{% endhighlight %} - - - - - -### Screen readers and keyboard navigation - -Hide an element to all devices **except screen readers** with `.sr-only`. Combine `.sr-only` with `.sr-only-focusable` to show the element again when it's focused (e.g. by a keyboard-only user). Necessary for following [accessibility best practices](../getting-started/#accessibility). Can also be used as mixins. - -{% highlight html %} -Skip to main content -{% endhighlight %} - -{% highlight scss %} -// Usage as a Mixin -.skip-navigation { - .sr-only(); - .sr-only-focusable(); -} -{% endhighlight %} - - - - - -### Image replacement - -Utilize the `.text-hide` class or mixin to help replace an element's text content with a background image. - -{% example html %} -

Custom heading

-{% endexample %} - -{% highlight scss %} -// Usage as a Mixin -.heading { - .text-hide(); -} -{% endhighlight %} diff --git a/docs/_includes/css/images.md b/docs/_includes/css/images.md deleted file mode 100644 index fd1dcd907..000000000 --- a/docs/_includes/css/images.md +++ /dev/null @@ -1,40 +0,0 @@ - - -# Images - -## Responsive images - -Images in Bootstrap 3 can be made responsive-friendly via the addition of the `.img-responsive` class. This applies `max-width: 100%;` and `height: auto;` to the image so that it scales nicely to the parent element. - -
- Generic responsive image -
- -{% highlight html %} -Responsive image -{% endhighlight %} - -
-

SVG images and IE 8-10

-

In Internet Explorer 8-10, SVG images with .img-responsive are disproportionately sized. To fix this, add width: 100% \9; where necessary. Bootstrap doesn't apply this automatically as it causes complications to other image formats.

-
- - - - - -## Image shapes - -Add classes to an `` element to easily style images in any project. - -
- A generic square placeholder image with rounded corners - A generic square placeholder image where only the portion within the circle circumscribed about said square is visible - A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera -
- -{% highlight html %} -... -... -... -{% endhighlight %} diff --git a/docs/_includes/css/overview.md b/docs/_includes/css/overview.md deleted file mode 100644 index 552ac2a0b..000000000 --- a/docs/_includes/css/overview.md +++ /dev/null @@ -1,86 +0,0 @@ - - -# Overview - -Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development. - - - - - -### HTML5 doctype - -Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects. - -{% highlight html %} - - - ... - -{% endhighlight %} - - - - - -### Mobile first - -With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, **Bootstrap is mobile first**. Mobile first styles can be found throughout the entire library instead of in separate files. - -To ensure proper rendering and touch zooming, **add the viewport meta tag** to your ``. - -{% highlight html %} - -{% endhighlight %} - -You can disable zooming capabilities on mobile devices by adding `user-scalable=no` to the viewport meta tag. This disables zooming, meaning users are only able to scroll, and results in your site feeling a bit more like a native application. Overall, we don't recommend this on every site, so use caution! - -{% highlight html %} - -{% endhighlight %} - - - - - -### Typography and links - -Bootstrap sets basic global display, typography, and link styles. Specifically, we: - -- Set `background-color: #fff;` on the `` -- Use the `@font-family-base`, `@font-size-base`, and `@line-height-base` attributes as our typographic base -- Set the global link color via `@link-color` and apply link underlines only on `:hover` - -These styles can be found within `scaffolding.less`. - - - - - -### Normalize - -For improved cross-browser rendering, we use [Normalize.css](http://necolas.github.io/normalize.css/) to correct small inconsistencies across browsers and devices. - - - - - -### Containers - -Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Note that, due to `padding` and more, neither container is nestable. - -Use `.container` for a responsive fixed width container. - -{% highlight html %} -
- ... -
-{% endhighlight %} - -Use `.container-fluid` for a full width container, spanning the entire width of your viewport. - -{% highlight html %} -
- ... -
-{% endhighlight %} diff --git a/docs/_includes/css/responsive-utilities.html b/docs/_includes/css/responsive-utilities.html deleted file mode 100644 index 2e4c8b383..000000000 --- a/docs/_includes/css/responsive-utilities.html +++ /dev/null @@ -1,256 +0,0 @@ -
-

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.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Extra small devices - Phones (<768px) - - Small devices - Tablets (≥768px) - - Medium devices - Desktops (≥992px) - - Large devices - Desktops (≥1200px) -
.visible-xs-*Visible
.visible-sm-*Visible
.visible-md-*Visible
.visible-lg-*Visible
.hidden-xsVisibleVisibleVisible
.hidden-smVisibleVisibleVisible
.hidden-mdVisibleVisibleVisible
.hidden-lgVisibleVisibleVisible
-
- -

As of v3.2.0, the .visible-*-* classes for each breakpoint come in three variations, one for each CSS display property value listed below.

-
- - - - - - - - - - - - - - - - - - - - - -
Group of classesCSS display
.visible-*-blockdisplay: block;
.visible-*-inlinedisplay: inline;
.visible-*-inline-blockdisplay: inline-block;
-
-

So, for extra small (xs) screens for example, the available .visible-*-* classes are: .visible-xs-block, .visible-xs-inline, and .visible-xs-inline-block.

- -

Print classes

-

Similar to the regular responsive classes, use these for toggling content for print.

-
- - - - - - - - - - - - - - - - - - - - -
ClassesBrowserPrint
- .visible-print-block
- .visible-print-inline
- .visible-print-inline-block -
Visible
.hidden-printVisible
-
- - -

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.

-
-
- - ✔ Visible on x-small -
-
- - ✔ Visible on small -
-
-
- Medium - ✔ Visible on medium -
-
- - ✔ Visible on large -
-
-
-
- - ✔ Visible on x-small and small -
-
- - ✔ Visible on medium and large -
-
-
- - ✔ Visible on x-small and medium -
-
- - ✔ Visible on small and large -
-
-
- - ✔ Visible on x-small and large -
-
- - ✔ Visible on small and medium -
-
- -

Hidden on...

-

Here, green checkmarks also indicate the element is hidden in your current viewport.

-
-
- - ✔ Hidden on x-small -
-
- - ✔ Hidden on small -
-
-
- Medium - ✔ Hidden on medium -
-
- - ✔ Hidden on large -
-
-
-
- - ✔ Hidden on x-small and small -
-
- - ✔ Hidden on medium and large -
-
-
- - ✔ Hidden on x-small and medium -
-
- - ✔ Hidden on small and large -
-
-
- - ✔ Hidden on x-small and large -
-
- - ✔ Hidden on small and medium -
-
-
diff --git a/docs/_includes/css/tables.html b/docs/_includes/css/tables.html deleted file mode 100644 index ca9030804..000000000 --- a/docs/_includes/css/tables.html +++ /dev/null @@ -1,458 +0,0 @@ -
-

Tables

- -

Basic example

-

For basic styling—light padding and only horizontal dividers—add the base class .table to any <table>. It may seem super redundant, but given the widespread use of tables for other plugins like calendars and date pickers, we've opted to isolate our custom table styles.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
-
-{% highlight html %} - - ... -
-{% endhighlight %} - - -

Striped rows

-

Use .table-striped to add zebra-striping to any table row within the <tbody>.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larrythe Bird@twitter
-
-{% highlight html %} - - ... -
-{% endhighlight %} - - -

Bordered table

-

Add .table-bordered for borders on all sides of the table and cells.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#First NameLast NameUsername
1MarkOtto@mdo
MarkOtto@TwBootstrap
2JacobThornton@fat
3Larry the Bird@twitter
-
-{% highlight html %} - - ... -
-{% endhighlight %} - - -

Hover rows

-

Add .table-hover to enable a hover state on table rows within a <tbody>.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
-
-{% highlight html %} - - ... -
-{% endhighlight %} - - -

Condensed table

-

Add .table-condensed to make tables more compact by cutting cell padding in half.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#First NameLast NameUsername
1MarkOtto@mdo
2JacobThornton@fat
3Larry the Bird@twitter
-
-{% highlight html %} - - ... -
-{% endhighlight %} - - -

Contextual classes

-

Use contextual classes to color table rows or individual cells.

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ClassDescription
- .active - Applies the hover color to a particular row or cell
- .success - Indicates a successful or positive action
- .info - Indicates a neutral informative change or action
- .warning - Indicates a warning that might need attention
- .danger - Indicates a dangerous or potentially negative action
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Column headingColumn headingColumn heading
1Column contentColumn contentColumn content
2Column contentColumn contentColumn content
3Column contentColumn contentColumn content
4Column contentColumn contentColumn content
5Column contentColumn contentColumn content
6Column contentColumn contentColumn content
7Column contentColumn contentColumn content
8Column contentColumn contentColumn content
9Column contentColumn contentColumn content
-
-{% highlight html %} - -... -... -... -... -... - - - - ... - ... - ... - ... - ... - -{% endhighlight %} - - -

Responsive tables

-

Create responsive tables by wrapping any .table in .table-responsive to make them scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

- -
-

Firefox and fieldsets

-

Firefox has some awkward fieldset styling involving width that interferes with the responsive table. This cannot be overriden without a Firefox-specific hack that we don't provide in Bootstrap:

-{% highlight css %} -@-moz-document url-prefix() { - fieldset { display: table-cell; } -} -{% endhighlight %} -

For more information, read this Stack Overflow answer.

-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Table headingTable headingTable headingTable headingTable headingTable heading
1Table cellTable cellTable cellTable cellTable cellTable cell
2Table cellTable cellTable cellTable cellTable cellTable cell
3Table cellTable cellTable cellTable cellTable cellTable cell
-
-
-{% highlight html %} -
- - ... -
-
-{% endhighlight %} -
diff --git a/docs/_includes/css/type.md b/docs/_includes/css/type.md deleted file mode 100644 index a16b96b81..000000000 --- a/docs/_includes/css/type.md +++ /dev/null @@ -1,385 +0,0 @@ - - -# Typography - -Bootstrap includes simple and easily customized typography across the project. In addition to the standard headings, body text, and lists, utility classes are also included. - - - - - -## Headings - -All HTML headings, `

` through `

`, are available. `.h1` through `.h6` classes are also available, for when you want to match the font styling of a heading but still want your text to be displayed inline. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

h1. Bootstrap heading

Semibold 36px

h2. Bootstrap heading

Semibold 30px

h3. Bootstrap heading

Semibold 24px

h4. Bootstrap heading

Semibold 18px
h5. Bootstrap heading
Semibold 14px
h6. Bootstrap heading
Semibold 12px
-
- -{% highlight html %} -

h1. Bootstrap heading

-

h2. Bootstrap heading

-

h3. Bootstrap heading

-

h4. Bootstrap heading

-
h5. Bootstrap heading
-
h6. Bootstrap heading
-{% endhighlight %} - -Create lighter, secondary text in any heading with a generic `` tag or the `.small` class. - -
- - - - - - - - - - - - - - - - - - - - - -

h1. Bootstrap heading Secondary text

h2. Bootstrap heading Secondary text

h3. Bootstrap heading Secondary text

h4. Bootstrap heading Secondary text

h5. Bootstrap heading Secondary text
h6. Bootstrap heading Secondary text
-
- -{% highlight html %} -

h1. Bootstrap heading Secondary text

-

h2. Bootstrap heading Secondary text

-

h3. Bootstrap heading Secondary text

-

h4. Bootstrap heading Secondary text

-
h5. Bootstrap heading Secondary text
-
h6. Bootstrap heading Secondary text
-{% endhighlight %} - - - - - -## Body copy - -Bootstrap's base text is sized with global `font-size: 16px;` and `line-height: 1.5;`. This is applied to the `` and all paragraphs. - -{% example html %} -

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

-

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

-

Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.

-{% endexample %} - - - - - -## Lead - -Make a paragraph stand out by adding `.lead`. - -{% example html %} -

- Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus. -

-{% endexample %} - - - - - -## Inline text elements - -Styling for all the common inline HTML5 elements. - -{% example html %} -

You can use the mark tag to highlight text.

-

This line of text is meant to be treated as deleted text.

-

This line of text is meant to be treated as no longer accurate.

-

This line of text is meant to be treated as an addition to the document.

-

This line of text will render as underlined

-

This line of text is meant to be treated as fine print.

-

This line rendered as bold text.

-

This line rendered as italicized text.

-

-{% endexample %} - -
-

Alternate elements

-

Feel free to use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without conveying additional importance while <i> is mostly for voice, technical terms, etc.

-
- - - - - -## Alignment classes - -Easily realign text to components with text alignment classes. - -{% example html %} -

Left aligned text.

-

Center aligned text.

-

Right aligned text.

-

Justified text.

-

No wrap text.

-{% endexample %} - - - - - -## Transformation classes - -Transform text in components with text capitalization classes. - -{% example html %} -

Lowercased text.

-

Uppercased text.

-

Capitalized text.

-{% endexample %} - - - - - -## Abbreviations - -Stylized implementation of HTML's `` element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a `title` attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover. - -### Basic abbreviation - -For expanded text on long hover of an abbreviation, include the `title` attribute with the `` element. - -{% example html %} -attr -{% endexample %} - -### Initialism - -Add `.initialism` to an abbreviation for a slightly smaller font-size. - -{% example html %} -HTML -{% endexample %} - - - - - -## Address - -Present contact information for the nearest ancestor or the entire body of work. Preserve formatting by ending all lines with `
`. - -{% example html %} -
- Twitter, Inc.
- 795 Folsom Ave, Suite 600
- San Francisco, CA 94107
- P: (123) 456-7890 -
- -
- Full Name
- first.last@example.com -
-{% endexample %} - - - - - -## Blockquotes - -For quoting blocks of content from another source within your document. - -### Default blockquote - -Wrap `
` around any HTML as the quote. For straight quotes, we recommend a `

`. - -{% example html %} -

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

-
-{% endexample %} - -### Blockquote options - -Style and content changes for simple variations on a standard `
`. - -#### Naming a source - -Add a `