X-Git-Url: http://git.roojs.org/?p=bootswatch;a=blobdiff_plain;f=bower_components%2Fbootstrap%2Fgetting-started.html;h=cdc9e7603ee6573746ea251fd6517434d05b0119;hp=cd3575ad2219022eb46329e5f6bdba4de2e467e1;hb=48c64127b37be4a692a70cb7b38ed9744163582b;hpb=620e501c3d804b1dc2c7d796d7ae378db5e1a040 diff --git a/bower_components/bootstrap/getting-started.html b/bower_components/bootstrap/getting-started.html index cd3575a..cdc9e76 100755 --- a/bower_components/bootstrap/getting-started.html +++ b/bower_components/bootstrap/getting-started.html @@ -13,31 +13,31 @@ base_url: "../"
There are a few easy ways to quickly get started with Bootstrap, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.
+Bootstrap has a few easy ways to quickly get started, each one appealing to a different skill level and use case. Read through to see what suits your particular needs.
The fastest way to get Bootstrap is to download the compiled and minified versions of our CSS and JavaScript, along with the included fonts. No documentation or original source files are included.
- +The fastest way to get Bootstrap is to download the precompiled and minified versions of our CSS, JavaScript, and fonts. No documentation or original source code files are included.
+Download precompiled Bootstrap
The folks over at NetDNA have graciously provided CDN support for Bootstrap's CSS and JavaScript. To use, swap your local instances for the Bootstrap CDN links listed below.
+The folks over at MaxCDN graciously provide CDN support for Bootstrap's CSS and JavaScript. Just use these Bootstrap CDN links.
{% highlight html %} @@ -50,32 +50,33 @@ base_url: "../" {% endhighlight %}If you download the original files, you need to compile Bootstrap's LESS files into usable CSS. To do that, Bootstrap only officially supports Recess, Twitter's CSS hinter built on top of less.js.
+If you work with Bootstrap's uncompiled source code, you need to compile the LESS files to produce usable CSS files. For compiling LESS files into CSS, we only officially support Recess, which is Twitter's CSS hinter based on less.js.
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations.
+Within the download you'll find the following directories and files, logically grouping common resources and providing both compiled and minified variations.
Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this:
+ {% highlight bash %} bootstrap/ âââ css/ â âââ bootstrap.css â âââ bootstrap.min.css â âââ bootstrap-theme.css -â âââ bootstrap-theme.min.css +â âââ bootstrap-theme.min.css âââ js/ â âââ bootstrap.js -â âââ bootstrap.min.js +â âââ bootstrap.min.js âââ fonts/ âââ glyphicons-halflings-regular.eot âââ glyphicons-halflings-regular.svg @@ -83,24 +84,23 @@ bootstrap/ âââ glyphicons-halflings-regular.woff {% endhighlight %} -This is the most basic form of Bootstrap: compiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (bootstrap.*
), as well as compiled and minified CSS and JS (bootstrap.min.*
). Fonts from Glyphicons are included, as is the optional Bootstrap theme.
This is the most basic form of Bootstrap: precompiled files for quick drop-in usage in nearly any web project. We provide compiled CSS and JS (bootstrap.*
), as well as compiled and minified CSS and JS (bootstrap.min.*
). Fonts from Glyphicons are included, as is the optional Bootstrap theme.
Please note that all JavaScript plugins require jQuery to be included, as shown in the starter template.
+Please note that all JavaScript plugins require jQuery to be included, as shown in the starter template. Consult our bower.json
to see which versions of jQuery are supported.
Make use of a super basic HTML template, or dive into a few examples we've started for you. We encourage folks to iterate on these examples and not simply use them as an end result.
+Start with this basic HTML template, or modify these examples. We hope you'll customize our templates and examples, adapting them to suit your needs.
-Copy and paste the HTML from below to get started with a bare bones Bootstrap document.
+Copy the HTML below to begin working with a minimal Bootstrap document.
{% highlight html %} @@ -110,17 +110,18 @@ bootstrap/ - + +Build on the basic template above with Bootstrap's many components. Check out some of the more advanced tips for how to customize and build on top of them.
+Build on the basic template above with Bootstrap's many components. See also Customizing Bootstrap for tips on maintaining your own Bootstrap variants.
Expand on the default navbar and more to create justified navigation links.
+Create a custom navbar with justified links. Heads up! Not too WebKit friendly.
Don't want your site or application to be scaled on different devices? With a little bit of work, you can disable the responsive features of Bootstrap so that mobile users see your full desktop-version site. Read below or check out the non-responsive example.
+Bootstrap automatically adapts your pages for various screen sizes. + Here's how to disable this feature so your page works like in this non-responsive example.
-To disable responsive features, follow these steps. See it in action in the modified template below.
+<meta>
mentioned in the CSS docsmax-width
on the .container
for all grid tiers with max-width: none !important;
and set a regular width like width: 970px;
. Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important
with media queries or some selector-fu..col-xs-*
classes in addition to or in place of the medium/large ones. Don't worry, the extra-small device grid scales up to all resolutions, so you're set there.<meta>
mentioned in the CSS docswidth
on the .container
for each grid tier with a single width, for example width: 970px !important;
Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important
with media queries or some selector-fu..col-xs-*
classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.You'll still need Respond.js for IE8 (since our media queries are still there and need to be picked up). This just disables the "mobile site" of Bootstrap.
+You'll still need Respond.js for IE8 (since our media queries are still there and need to be processed). + This disables the "mobile site" aspects of Bootstrap.
-We've taken the above steps and applied them to an example. Read it's source code to see the specific changes called out.
+We've applied these steps to an example. Read its source code to see the specific changes implemented.
Folks looking to upgrade to v3 should use this section as a general upgrade guide. We've outlined some of the major changes and provided tables that highlight key changes. For an overview, read the announcement blog post.
- +Bootstrap 3 is not backwards compatible with v2.x. Use this section as a general guide to upgrading from v2.x to v3.0. For a broader overview, see what's new in the v3.0 release announcement.
Reference table for classes that have changed between v2.x and v3.0.
+This table shows the style changes between v2.x and v3.0.
.btn-large |
.btn-lg |
+ |
.alert-error |
+ .alert-danger |
+ |
.visible-phone |
- .visible-sm |
+ .visible-xs |
.visible-tablet |
- .visible-md |
+ .visible-sm |
.visible-desktop |
- .visible-lg |
+ .visible-md |
.hidden-phone |
- .hidden-sm |
+ .hidden-xs |
.hidden-tablet |
- .hidden-md |
+ .hidden-sm |
.hidden-desktop |
- .hidden-lg |
+ .hidden-md |
.input-small |
@@ -399,6 +401,10 @@ bootstrap/
.input-large |
.input-lg |
.control-group |
+ .form-group |
+ |
.checkbox.inline .radio.inline |
.checkbox-inline .radio-inline |
@@ -412,7 +418,7 @@ bootstrap/
.input-group-addon |
.thumbnail |
+ .img-polaroid |
.img-thumbnail |
ul.inline |
.list-inline |
|
.muted |
+ .text-muted |
+ |
.text-error |
+ .text-danger |
+ |
.table .error |
+ .table .danger |
+ |
.bar |
+ .progress-bar |
+ |
.bar-* |
+ .progress-bar-* |
+ |
.accordion |
+ .panel-group |
+ |
.accordion-group |
+ .panel .panel-default |
+ |
.accordion-heading |
+ .panel-heading |
+ |
.accordion-body |
+ .panel-collapse |
+ |
.accordion-inner |
+ .panel-body |
+ |
.alert-error |
+ .alert-danger |
+
We've added a few new elements and changed some existing ones. Here's their new or updated classes.
+We've added new elements and changed some existing ones. Here are the new or updated styles.
.jumbotron |
||||||||||||||||||||||||||||||||||||||||
Tiny grid (<768 px) | +Extra small grid (<768px) | .col-xs-* |
||||||||||||||||||||||||||||||||||||||
Small grid (>768 px) | +Small grid (≥768px) | .col-sm-* |
||||||||||||||||||||||||||||||||||||||
Medium grid (>992 px) | +Medium grid (≥992px) | .col-md-* |
||||||||||||||||||||||||||||||||||||||
Large grid (>1200 px) | +Large grid (≥1200px) | .col-lg-* |
||||||||||||||||||||||||||||||||||||||
Responsive utility classes (≥1200px) | +.visible-lg .hidden-lg |
+ |||||||||||||||||||||||||||||||||||||||
Offsets | .col-sm-offset-* .col-md-offset-* .col-lg-offset-* |
@@ -541,7 +594,7 @@ bootstrap/
.row-fluid |
.row (no more fixed grid) |
+ ||
Controls wrapper | +.controls |
+ N/A | +|
Controls row | +.controls-row |
+ .row or .form-group |
+ |
Navbar inner | .navbar-inner |
N/A | |
Navbar vertical dividers | +.navbar .divider-vertical |
+ N/A | +|
Dropdown submenu | .dropdown-submenu |
@@ -587,61 +655,123 @@ bootstrap/
.tabs-left .tabs-right .tabs-below |
N/A |
Nav lists | +.nav-list .nav-header |
+ No direct equivalent, but list groups and .panel-group s are similar. |
+
We've made many underlying changes in v3 that are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our mobile first approach.
+Other changes in v3.0 are not immediately apparent. Base classes, key styles, and behaviors have been adjusted for flexibility and our mobile first approach. Here's a partial list:
<div class="col-*"></div>
to control input widths..form-control
class on the element to style..form-control
class applied are now 100% wide by default. Wrap inputs inside <div class="col-*"></div>
to control input widths..badge
no longer has contextual (-success,-primary,etc..) classes..btn
must also use .btn-default
to get the "default" button..container
and .row
are now fluid (percentage-based)..img-responsive
for fluid <img>
size..glyphicon
, are now font based. They also require a base and icon class (e.g. .glyphicon .glyphicon-asterisk
)..glyphicon
, are now font based. Icons also require a base and icon class (e.g. .glyphicon .glyphicon-asterisk
)..modal-header
, .modal-body
, and .modal-footer
sections now get wrapped in .modal-content
and .modal-dialog
for improved mobile styling and behavior..modal-header
, .modal-body
, and .modal-footer
sections are now wrapped in .modal-content
and .modal-dialog
for better mobile styling and behavior.remote
modal option is now injected into the .modal
instead of into the .modal-body
. This allows you to also easily vary the header and footer of the modal, not just the modal body.'show.bs.modal'
. For tabs "shown" use 'shown.bs.tab'
, etc..For more information on upgrades and code snippets from the community check out Bootply.
+For more information on upgrading to v3.0, and code snippets from the community, see Bootply.
-Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older and less advanced browsers might receive a less stylized, though fully functional, version of certain components.
+Bootstrap is built to work best in the latest desktop and mobile browsers, meaning older browsers might display differently styled, though fully functional, renderings of certain components.
Specifically, we support the latest versions of the following:
Unofficially, Bootstrap should look and behave well enough in Chromium for Linux and Internet Explorer 7, though they are not officially supported.
+Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 7, though they are not officially supported.
Internet Explorer 8 and 9 are also supported, however, please be aware that many CSS3 propertiesâe.g., rounded corners and shadowsâare not supported by IE8. The placeholder
attribute is also not supported in either of these versions.
In addition, Internet Explorer 8 requires the use of respond.js to enable media query support.
+Internet Explorer 8 and 9 are also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported by these browsers. In addition, Internet Explorer 8 requires the use of Respond.js to enable media query support.
+Feature | +Internet Explorer 8 | +Internet Explorer 9 | +
---|---|---|
border-radius |
+ Not supported | +Supported | +
box-shadow |
+ Not supported | +Supported | +
transform |
+ Not supported | + Supported, with -ms prefix |
+
transition |
+ Not supported | +|
placeholder |
+ Not supported | +
Visit Can I use... for details on browser support of CSS3 and HTML5 features.
-Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.
+Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. See the Respond.js docs for details.
+file://
Due to browser security rules, Respond.js doesn't work with pages viewed via the file://
protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). See the Respond.js docs for details.
@import
Respond.js doesn't work with CSS that's referenced via @import
. In particular, some Drupal configurations are known to use @import
. See the Respond.js docs for details.
IE8 does not fully support box-sizing: border-box;
when combined with min-width
, max-width
, min-height
, or max-height
. For that reason, as of v3.0.1, we no longer use max-width
on .container
s.
Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate <meta>
tag in your pages:
This tag is included in all docs pages and examples to ensure the best rendering possible in each supported version of Internet Explorer.
See this StackOverflow question for more information.
-Internet Explorer 10 doesn't differentiate device width from viewport width, and thus doesn't properly apply the media queries in Bootstrap's CSS. To address this, you can optionally include the following CSS and JavaScript to work around this problem until Microsoft issues a fix.
+Internet Explorer 10 doesn't differentiate device width from viewport width, and thus doesn't properly apply the media queries in Bootstrap's CSS. Normally you'd just add a quick snippet of CSS to fix this:
+{% highlight css %} +@-ms-viewport { width: device-width; } +{% endhighlight %} +However, this doesn't work as it causes Windows Phone 8 devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to include the following CSS and JavaScript to work around the bug until Microsoft issues a fix.
{% highlight css %} @-webkit-viewport { width: device-width; } @-moz-viewport { width: device-width; } @@ -662,27 +792,27 @@ if (navigator.userAgent.match(/IEMobile\/10\.0/)) { } {% endhighlight %}For more information and usage guidelines, read Windows Phone 8 and Device-Width.
+As a heads up, we include this in the Bootstrap docs as an example.
-In the latest Safari for Mac, its rendering engine has a little trouble with the long decimal places of our .col-*-1
grid classes, meaning if you have 12 individual columns you'll notice they come up short compared to other rows of columns. There's not much we can do here (see #9282) but you do have some options:
As of Safari v6.1 for OS X and Safari for iOS v7.0.1, Safari's rendering engine has some trouble with the number of decimal places used in our .col-*-1
grid classes. So if you have 12 individual grid columns, you'll notice that they come up short compared to other rows of columns. We can't do much here (see #9282) but you do have some options:
.pull-right
to your last grid column to get the hard-right alignmentWe'll keep an eye on this though and update our code if we have an easy solution.
-Support for overflow: hidden
on the <body>
element is quite limited in iOS and Android. To that end, when you scroll past the top or bottom of a modal in either of those devices' browsers, the <body>
content will begin to scroll.
Also, note that if you're using inputs in your modal â iOS has a rendering bug which doesn't update the position of fixed elements when the virtual keyboard is triggered. There are a few work arounds for this, including transforming your elements to position: absolute
or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.
Also, note that if you're using inputs in your modal â iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to position: absolute
or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application.
Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.
While we don't officially support any third party plugins or add-ons, we do offer some useful advice to help avoid potential issues in your projects.
-If you're using Google Maps on a Bootstrapped project, you might run into some display problems due to our use of * { box-sizing: border-box; }
. Previously, you may have also ran into issues with the use of max-width
on images. The following snippet should avoid all those problems.
Some third party software, including Google Maps and Google Custom Search Engine, conflict with Bootstrap due to * { box-sizing: border-box; }
, a rule which makes it so padding
does not affect the final computed width of an element. Learn more about box model and sizing at CSS Tricks.
Depending on the context, you may override as-needed (Option 1) or reset the box-sizing for entire regions (Option 2).
{% highlight css %} -/* Fix Google Maps canvas +/* Box-sizing resets * - * Wrap your Google Maps embed in a `.google-map-canvas` to reset Bootstrap's - * global `box-sizing` changes. You may optionally need to reset the `max-width` - * on images in case you've applied that anywhere else. (That shouldn't be as - * necessary with Bootstrap 3 though as that behavior is relegated to the - * `.img-responsive` class.) + * Reset individual elements or override regions to avoid conflicts due to + * global box model settings of Bootstrap. Two options, individual overrides and + * region resets, are available as plain CSS and uncompiled LESS formats. */ -.google-map-canvas, -.google-map-canvas * { .box-sizing(content-box); } +/* Option 1A: Override a single element's box model via CSS */ +.element { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* Option 1B: Override a single element's box model by using a Bootstrap LESS mixin */ +.element { + .box-sizing(content-box); +} -/* Optional responsive image override */ -img { max-width: none; } +/* Option 2A: Reset an entire region via CSS */ +.reset-box-sizing, +.reset-box-sizing *, +.reset-box-sizing *:before, +.reset-box-sizing *:after { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* Option 2B: Reset an entire region with a custom LESS mixin */ +.reset-box-sizing { + &, + *, + *:before, + *:after { + .box-sizing(content-box); + } +} +.element { + .reset-box-sizing(); +} {% endhighlight %} -Bootstrap follows common web standards, and with minimal extra effort, can be used to create sites that are accessibile to those using AT.
+Bootstrap follows common web standards, and with minimal extra effort, can be used to create sites that are accessible to those using AT.
If your navigation contains many links and comes before the main content in the DOM, add a Skip to content
link immediately after your opening <body>
tag. (read why)
If your navigation contains many links and comes before the main content in the DOM, add a Skip to main content
link immediately after your opening <body>
tag. (read why)
Another "gotcha" has to do with how you nest your <header>
elements. Section 508 states that your largest header must be an h1
, and the next header must be an <h2>
, etc. This is hard to achieve in practice, but if the largest header on your site is smaller than Bootstrap's default 38px, you should consider modifying your stylesheets before using a smaller header element.
When nesting headings (<h1>
- <h6>
), your primary document header should be an <h1>
. Subsequent headings should make logical use of <h2>
- <h6>
such that screen readers can construct a table of contents for your pages.
Learn more at HTML CodeSniffer and Penn State's AccessAbility.
Customizing Bootstrap is best accomplished when you treat it as another dependency in your development stack. Doing so ensures future upgrades are as easy as possible while also familiarizing yourself to the intricacies of the framework.
+Bootstrap is best maintained when you treat it as a separate and independently-versioned dependency in your development environment. Doing this makes upgrading Bootstrap easier in the future.
-Once you've downloaded and included Bootstrap's CSS into your templates, you can move on to customizing the included components. To do so, create a new stylesheet (LESS, if you like, or just plain CSS) to house your customizations.
+Once you've downloaded and included Bootstrap's styles and scripts, you can customize its components. Just create a new stylesheet (LESS, if you like, or just plain CSS) to house your customizations.
Unless you plan on reading a good chunk of the compiled CSS, go with the minified. It's the same code, just compacted. Less bandwidth is good, especially in production environments.
+Unless you plan on reading the CSS, go with minified stylesheets. It's the same code, just compacted. Minified styles use less bandwidth, which is good, especially in production environments.
From there, include whatever Bootstrap components and HTML content you need to get your template setup. It's best to have a rough idea in mind of modifications to make and content to include, so be sure to spend a brief amount of time on that before moving on.
+From there, include whatever Bootstrap components and HTML content you need to create templates for your site's pages.
There are varying degrees to customizing components, but most fall into two camps: light customizations and complete visual overhauls. Luckily, there are plenty of examples of both.
-We define light customizations as mostly surface layer changes, things like a color and font changes to existing Bootstrap components. A great example of this is the the Twitter Translation Center (coded by @mdo). Let's look at how to implement the custom button we wrote for this site, .btn-ttc
.
Instead of using the provided Bootstrap buttons, which only require just one class to start, .btn
, we'll add our own modifier class, .btn-ttc
. This will give us a slightly custom look with minimal effort.
You can customize components to varying degrees, but most fall into two camps: light customizations and overhauls. Plenty examples of both are available from third parties.
+We define light customizations as superficial changes, for example, color and font changes to existing Bootstrap components. A light customization example is the Twitter Translation Center (coded by @mdo). Let's look at how to implement the custom button we wrote for this site, .btn-ttc
.
The stock Bootstrap buttons require just one class, .btn
, to start. Here we extend the .btn
style with a new modifier class, .btn-ttc
, that we will create. This gives us a distinct custom look with minimal effort.
Our customized button will be coded like this:
{% highlight html %} {% endhighlight %} +Note how .btn-ttc
is added to the standard .btn
class.
In the custom stylesheet, add the following CSS:
+To implement this, in the custom stylesheet, add the following CSS:
{% highlight css %} /* Custom button @@ -846,21 +1003,23 @@ img { max-width: none; } } {% endhighlight %} -Customizing Bootstrap components takes time, but should be straightforward. Look to the source code often and duplicate the selectors you need for your modifications. Placing them after the Bootstrap source makes for easy overriding without complication. To recap, here's the basic workflow:
+In short: Look to the style source and duplicate the selectors you need for your modifications.
+In summary, here's the basic workflow:
.navbar
.!important
here..navbar
style specification.!important
here. Keep it simple.Going beyond light customizations and into visual overhauls is just as straightforward as the above custom button. For a site like Karma, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved, but well worth it in the end.
+Once you are comfortable performing light customizations, visual overhauls are just as straightforward. For a site like Karma, which uses Bootstrap as a CSS reset with heavy modifications, more extensive work is involved. But the same principle applies: include Bootstrap's default stylesheet first, then apply your custom stylesheet.
While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source .less files (making upgrades super difficult), and the second is mapping source LESS code to your own classes via mixins. For the time being, neither of those options are documented here.
+While not recommended for folks new to Bootstrap, you may use one of two alternate methods for customization. The first is modifying the source .less
files (making upgrades super difficult), and the second is mapping source LESS code to your own classes via mixins. For the time being, neither of those options are documented here.
Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where bandwidth literally becomes a financial issue. We encourage folks to remove whatever is unused with our Customizer.
+Not all sites and applications need to make use of everything Bootstrap has to offer, especially in production environments where optimizing bandwidth is an issue. We encourage you to remove whatever is unused with our Customizer.
Using the Customizer, simply uncheck any component, feature, or asset you don't need. Hit download and swap out the default Bootstrap files with these newly customized ones. You'll get vanilla Bootstrap, but without the features *you* deem unnecessary. All custom builds include compiled and minified versions, so use whichever works for you.