From ee747f4adfeb80497c0896fbaab4f2c3e2b2a88b Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 8 Aug 2015 14:20:38 -0700 Subject: tweak getting started quickstart docs --- docs/getting-started/overview.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'docs/getting-started') diff --git a/docs/getting-started/overview.md b/docs/getting-started/overview.md index 84dc5c712..88884f2e6 100644 --- a/docs/getting-started/overview.md +++ b/docs/getting-started/overview.md @@ -1,30 +1,26 @@ --- layout: page -title: Start using Bootstrap +title: Quick start group: getting-started --- -Quickly add Bootstrap to your project via the Bootstrap CDN, graciously provided by the MaxCDN folks. +Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, graciously provided by the MaxCDN folks. -## Include CSS and JS - -Copy-paste the stylesheet `` into your `` before all other stylesheets. - -
- Heads up! Much of this page will be inaccurate during the v4 alpha releases. -
+Copy-paste the stylesheet `` into your `` before all other stylesheets to load our CSS. {% highlight html %} {% endhighlight %} -Then, add the Bootstrap JavaScript—and jQuery—near the end of your pages. It's best placed right before the closing `` tag. Be sure to place jQuery first as our code depends on it. +Add our JavaScript plugins and jQuery near the end of your pages, right before the closing `` tag. Be sure to place jQuery first as our code depends on it. {% highlight html %} {% endhighlight %} +And that's it—you're your way to a fully Bootstrapped site. If you're at all unsure about the general page structure, keep reading for an example page template. + ## Page template Be sure to have your pages set up with the latest design and development standards. That means: @@ -40,16 +36,18 @@ Put it all together and your pages should look like this: - + +

Hello, world!

+ {% endhighlight %} -And that's it. Happy Bootstrapping! +That's all you need for overall page requirements. Visit the [Layout docs]({{ site.baseurl }}/layout/scaffolding) to start laying out your site's content before adding components. -- cgit v1.2.3 From 7936455907feadc5bb1a457e222ad77716fe35f8 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 8 Aug 2015 14:22:31 -0700 Subject: tweak that, link to downloads --- docs/getting-started/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/getting-started') diff --git a/docs/getting-started/overview.md b/docs/getting-started/overview.md index 88884f2e6..2642aef53 100644 --- a/docs/getting-started/overview.md +++ b/docs/getting-started/overview.md @@ -4,7 +4,7 @@ title: Quick start group: getting-started --- -Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, graciously provided by the MaxCDN folks. +Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, provided for free by the folks at MaxCDN. Using a package manager or need to download the source files? [Head to the downloads page.]({{ site.baseurl }}/getting-started/downloads) Copy-paste the stylesheet `` into your `` before all other stylesheets to load our CSS. -- cgit v1.2.3 From 66305c5b020165688864445f310f50c61fa96449 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 8 Aug 2015 14:22:46 -0700 Subject: correct url --- docs/getting-started/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/getting-started') diff --git a/docs/getting-started/overview.md b/docs/getting-started/overview.md index 2642aef53..c5a6c4822 100644 --- a/docs/getting-started/overview.md +++ b/docs/getting-started/overview.md @@ -4,7 +4,7 @@ title: Quick start group: getting-started --- -Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, provided for free by the folks at MaxCDN. Using a package manager or need to download the source files? [Head to the downloads page.]({{ site.baseurl }}/getting-started/downloads) +Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, provided for free by the folks at MaxCDN. Using a package manager or need to download the source files? [Head to the downloads page.]({{ site.baseurl }}/getting-started/download) Copy-paste the stylesheet `` into your `` before all other stylesheets to load our CSS. -- cgit v1.2.3 From e592a23eb7536baffd7c01b01a661b99a8ef9249 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 8 Aug 2015 14:57:12 -0700 Subject: docs twerks --- docs/getting-started/contents.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'docs/getting-started') diff --git a/docs/getting-started/contents.md b/docs/getting-started/contents.md index 9fb6a6ced..999a9b8a8 100644 --- a/docs/getting-started/contents.md +++ b/docs/getting-started/contents.md @@ -4,22 +4,11 @@ title: Contents group: getting-started --- -Bootstrap can come in one of two forms, as precompiled or source code. Learn more about each form's contents and structure below. - -{% callout warning %} -#### jQuery required - -Please note that **all JavaScript plugins require jQuery** to be included, as shown in the [starter template](../quick-start). [Consult our `bower.json`]({{ site.repo }}/blob/v{{ site.current_version }}/bower.json) to see which versions of jQuery are supported. -{% endcallout %} - -## Contents - -* Will be replaced with the ToC, excluding the "Contents" header -{:toc} +Bootstrap can come in one of two forms, as precompiled or source code. Learn more about each flavor's contents and structure below. Remember, no matter the implementation flavor, **Bootstrap's JavaScript plugins require jQuery**. ## Precompiled Bootstrap -Once downloaded, unzip the compressed folder to see the structure of (the compiled) Bootstrap. You'll see something like this: +Once downloaded, unzip the compressed folder and you'll see something like this: -- cgit v1.2.3 From 91d236664d468cb37f0e52d677cb93f6b243a1b7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Aug 2015 22:48:33 -0700 Subject: new getting started intro overview doodad --- docs/getting-started/introduction.md | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 docs/getting-started/introduction.md (limited to 'docs/getting-started') diff --git a/docs/getting-started/introduction.md b/docs/getting-started/introduction.md new file mode 100644 index 000000000..5197102c4 --- /dev/null +++ b/docs/getting-started/introduction.md @@ -0,0 +1,62 @@ +--- +layout: page +title: Introduction +group: getting-started +--- + +Bootstrap is the world's most popular framework for building responsive, mobile-first sites and applications. Inside you'll find high quality HTML, CSS, and JavaScript to make starting any project easier than ever. + +Here's how to quickly get started with the Bootstrap CDN and a template starter page. + +## Quick start + +Looking to quickly add Bootstrap to your project? Use the Bootstrap CDN, provided for free by the folks at MaxCDN. Using a package manager or need to download the source files? [Head to the downloads page.]({{ site.baseurl }}/getting-started/download) + +Copy-paste the stylesheet `` into your `` before all other stylesheets to load our CSS. + +{% highlight html %} + +{% endhighlight %} + +Add our JavaScript plugins and jQuery near the end of your pages, right before the closing `` tag. Be sure to place jQuery first as our code depends on it. + +{% highlight html %} + + +{% endhighlight %} + +And that's it—you're your way to a fully Bootstrapped site. If you're at all unsure about the general page structure, keep reading for an example page template. + +## Starter template + +Be sure to have your pages set up with the latest design and development standards. That means: + +* Using an HTML5 doctype +* Forcing Internet Explorer to use its latest rendering mode ([read more]()) +* And, utilizing the viewport meta tag. + +Put it all together and your pages should look like this: + +{% highlight html %} + + + + + + + + + + + + +

Hello, world!

+ + + + + + +{% endhighlight %} + +That's all you need for overall page requirements. Visit the [Layout docs]({{ site.baseurl }}/layout/scaffolding) or [our official examples](../examples/) to start laying out your site's content and components. -- cgit v1.2.3 From ce22176624117a821926001b55facfd0453382b7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Aug 2015 22:49:03 -0700 Subject: rewrite downloads page --- docs/getting-started/download.md | 81 ++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 40 deletions(-) (limited to 'docs/getting-started') diff --git a/docs/getting-started/download.md b/docs/getting-started/download.md index e5f3372a7..c718fbc83 100644 --- a/docs/getting-started/download.md +++ b/docs/getting-started/download.md @@ -4,58 +4,40 @@ title: Download group: getting-started --- -Bootstrap is available for download via ZIP file in two flavors: precompiled CSS and Javascript, and the complete source code with documentation. +**Bootstrap v{{ site.current_version}}** is available for download in several ways, including some of your favorite package managers. Choose from the options below to snag just what you need. -## Contents +
+
+{% markdown %} +### Compiled +Download just the compiled and minified CSS and JavaScript. Doesn't include any documentation or original source files. -* Will be replaced with the ToC, excluding the "Contents" header -{:toc} - -## Custom builds - -Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag just what you need. - -
-
-

Reboot

-

Includes variables/mixins, Normalize, and Reboot. No JavaScript.

- Download -
-
-

Grid only

-

Includes variables/mixins and our grid system. No JavaScript.

- Download +Download Bootstrap +{% endmarkdown %}
-
-

Flexbox

-

All of Bootstrap, with flexbox support enabled and lower browser support.

- Download +
+{% markdown %} +### Source files +Download everything: source Sass, JavaScript, and documentation files. **Requires a Sass compiler, [Autoprefixer](https://github.com/postcss/autoprefixer), and [some setup](../compiling).** + +Download source +{% endmarkdown %}
-## Precompiled - -Compiled and minified CSS and JavaScript. No docs or original source files are included. - -Download Bootstrap - -## Download source and docs - -Source Sass, JavaScript, and documentation. **Requires a Sass compiler and [some setup](../compiling).** - -Download source - ## Package managers +Pull in Bootstrap's **source files** into nearly any project with some of the most popular package managers. No matter the package manager, Bootstrap will **require a Sass compiler and [Autoprefixer](https://github.com/postcss/autoprefixer)** for a setup that matches our official compiled versions. + ### Bower -You can also install and manage Bootstrap's Sass, CSS, and JavaScript using [Bower](http://bower.io). +Install and manage Bootstrap's Sass and JavaScript using [Bower](http://bower.io). {% highlight bash %}$ bower install bootstrap{% endhighlight %} ### npm -Bootstrap is available as [an npm package](https://www.npmjs.org/package/bootstrap). Install it into your Node powered apps with: +Install Bootstrap in your Node powered apps with [the npm package](https://www.npmjs.org/package/bootstrap): {% highlight bash %}$ npm install bootstrap{% endhighlight %} @@ -74,12 +56,31 @@ $ meteor add twbs:bootstrap ### Composer -You can also install and manage Bootstrap's Less, CSS, JavaScript, and fonts using [Composer](https://getcomposer.org): +You can also install and manage Bootstrap's Sass and JavaScript using [Composer](https://getcomposer.org): {% highlight bash %} $ composer require twbs/bootstrap {% endhighlight %} -## Autoprefixer required -Bootstrap uses [Autoprefixer](https://github.com/postcss/autoprefixer) to deal with [CSS vendor prefixes](http://webdesign.about.com/od/css/a/css-vendor-prefixes.htm). If you're compiling Bootstrap from its source Sass and not using our Gruntfile, you'll need to integrate Autoprefixer into your build process yourself. If you're using precompiled Bootstrap or using our Gruntfile, you don't need to worry about this as Autoprefixer is already integrated into our Gruntfile. +## Custom builds + +Need only a part of Bootstrap's CSS or JS? Use one of the custom builds to snag just what you need. + +
+
+

Reboot

+

Includes variables/mixins, Normalize, and Reboot. No JavaScript.

+ Download +
+
+

Grid only

+

Includes variables/mixins and our grid system. No JavaScript.

+ Download +
+
+

Flexbox

+

All of Bootstrap with flexbox enabled and lower browser support.

+ Download +
+
-- cgit v1.2.3 From 317c667d1c0d1d0984d863d9d4baad9e1a25b1c6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 9 Aug 2015 23:12:09 -0700 Subject: rewrite browser and device support --- docs/getting-started/browsers-devices.md | 250 +++++++++++++++++++++++++++++++ docs/getting-started/support.md | 226 ---------------------------- 2 files changed, 250 insertions(+), 226 deletions(-) create mode 100644 docs/getting-started/browsers-devices.md delete mode 100644 docs/getting-started/support.md (limited to 'docs/getting-started') diff --git a/docs/getting-started/browsers-devices.md b/docs/getting-started/browsers-devices.md new file mode 100644 index 000000000..83cd83566 --- /dev/null +++ b/docs/getting-started/browsers-devices.md @@ -0,0 +1,250 @@ +--- +layout: page +title: Browsers and devices +group: getting-started +--- + +Bootstrap supports a wide variety of modern browsers and devices, and some older ones. See which exact ones below, as well as detailed information on known quirks and bugs. + +## Contents + +* Will be replaced with the ToC, excluding the "Contents" header +{:toc} + +## Supported browsers + +Bootstrap supports the **latest, stable releases** of all major browsers and platforms. On Windows, **we support Internet Explorer 9-11**. More specific support information is provided below. + +### Mobile devices + +Generally speaking, Bootstrap supports the latest versions of each major platform's default browsers. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChromeFirefoxOperaSafariAndroid Browser & WebView
AndroidSupportedSupportedNot supportedN/AAndroid v5.0+ supported
iOSSupportedN/ANot supportedSupportedN/A
+
+ +### Desktop browsers + +Similarly, the latest versions of most desktop browsers are supported. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ChromeFirefoxInternet ExplorerOperaSafari
MacSupportedSupportedN/ASupportedSupported
WindowsSupportedSupportedSupportedSupportedNot supported
+
+ +Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 8-, though they are not officially supported. + +For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs](../browser-bugs/). + +## Internet Explorer 9 + +Internet Explorer 9 is also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureStatus
border-radiusSupported
box-shadowSupported
transformSupported, with -ms prefix
transitionNot supported
placeholderNot supported
+
+ +Visit [Can I use...](http://caniuse.com/) for details on browser support of CSS3 and HTML5 features. + +## Supporting Internet Explorer 8 + +As of v4, Bootstrap no longer supports IE8. **If you require IE8 support, we recommend you use Bootstrap 3.** It's still supported by our team for bugfixes and documentation changes, but no new features will be added to it. + +Alternatively, you may add some third party JavaScript to backfill support for IE8 to Bootstrap 4. You'll need the following: + +* [The HTML5 shiv](http://en.wikipedia.org/wiki/HTML5_Shiv) +* [Respond.js](https://github.com/scottjehl/Respond) +* [Rem unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill) + +No support will be provided for this, though you may find some help from the community in [our Slack channel]({{ site.slack }}). + +## IE Compatibility modes + +Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate `` tag in your pages: + +{% highlight html %} + +{% endhighlight %} + +Confirm the document mode by opening the debugging tools: press F12 and check the "Document Mode". + +This tag is included in all of Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer. + +See [this StackOverflow question](https://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge) for more information. + +## Internet Explorer 10 in Windows Phone 8 + +Internet Explorer 10 in Windows Phone 8 versions older than [Update 3 (a.k.a. GDR3)](http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/10/14/introducing-windows-phone-preview-for-developers.aspx) doesn't differentiate **device width** from **viewport width** in `@-ms-viewport` at-rules, and thus doesn't properly apply the media queries in Bootstrap's CSS. To address this, you'll need to **include the following JavaScript to work around the bug**. + +{% highlight js %} +// Copyright 2014-2015 Twitter, Inc. +// Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) +if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement('style') + msViewportStyle.appendChild( + document.createTextNode( + '@-ms-viewport{width:auto!important}' + ) + ) + document.querySelector('head').appendChild(msViewportStyle) +} +{% endhighlight %} + +For more information and usage guidelines, read [Windows Phone 8 and Device-Width](http://timkadlec.com/2013/01/windows-phone-8-and-device-width/). + +As a heads up, we include this in all of Bootstrap's documentation and examples as a demonstration. + +## Modals, navbars, and virtual keyboards + +### Overflow and scrolling + +Support for `overflow: hidden;` on the `` 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 `` content will begin to scroll. + +### Virtual keyboards + +Also, note that if you're using a fixed navbar or using inputs within a modal, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to `position: absolute;` or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application. + +### Navbar Dropdowns + +The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or [any other element which will fire a click event in iOS](https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile)). + +## Browser zooming + +Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds. + +## Sticky `:hover`/`:focus` on mobile +Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make `:hover` "sticky". In other words, `:hover` styles start applying after tapping an element and only stop applying after the user taps some other element. On mobile-first sites, this behavior is normally undesirable. + +Bootstrap includes a workaround for this, although it is disabled by default. By setting `$use-hover-media-query` to `true` when compiling from Sass, Bootstrap will use [mq4-hover-shim](https://github.com/twbs/mq4-hover-shim) to disable `:hover` styles in browsers that emulate hovering, thus preventing sticky `:hover` styles. There are some caveats to this workaround; see the shim's documentation for details. + +## Printing + +Even in some modern browsers, printing can be quirky. + +In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. [See #12078 for some details.](https://github.com/twbs/bootstrap/issues/12078) Suggested workarounds: + +Also, as of Safari v8.0, fixed-width .containers can cause Safari to use an unusually small font size when printing. See #14868 for more details. One potential workaround for this is adding the following CSS:

+ +{% highlight css %} +@media print { + .container { + width: auto; + } +} +{% endhighlight %} + +## Android stock browser + +Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general. + +#### Select menu + +On `` as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers. + +{% highlight html %} + +{% endhighlight %} + +Want to see an example? [Check out this JS Bin demo.](http://jsbin.com/OyaqoDO/2) + +## Validators + +In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement. + +These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings. + +Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072). diff --git a/docs/getting-started/support.md b/docs/getting-started/support.md deleted file mode 100644 index 3712214fb..000000000 --- a/docs/getting-started/support.md +++ /dev/null @@ -1,226 +0,0 @@ ---- -layout: page -title: Supported platforms -group: getting-started ---- - -Bootstrap is built to work best with the latest techniques. As such, older desktop and mobile browsers may display differently, but should remain fully functional. - -## Contents - -* Will be replaced with the ToC, excluding the "Contents" header -{:toc} - -## Supported browsers - -Bootstrap supports the **latest, stable releases** of all major browsers and platforms. On Windows, **we support Internet Explorer 9-11**. More specific support information is provided below. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ChromeFirefoxInternet ExplorerOperaSafariAndroid Browser & WebView
AndroidSupportedSupportedN/ANot supportedN/AAndroid v5.0+
supported
iOSSupportedN/ANot supportedSupportedN/A
Mac OS XSupportedSupportedSupportedSupportedN/A
WindowsSupportedSupportedSupportedSupportedNot supportedN/A
-
- -Unofficially, Bootstrap should look and behave well enough in Chromium and Chrome for Linux, Firefox for Linux, and Internet Explorer 8-, though they are not officially supported. - -For a list of some of the browser bugs that Bootstrap has to grapple with, see our [Wall of browser bugs](../browser-bugs/). - -## Internet Explorer 9 - -Internet Explorer 9 is also supported, however, please be aware that some CSS3 properties and HTML5 elements are not fully supported. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureStatus
border-radiusSupported
box-shadowSupported
transformSupported, with -ms prefix
transitionNot supported
placeholderNot supported
-
- -Visit [Can I use...](http://caniuse.com/) for details on browser support of CSS3 and HTML5 features. - -## Supporting Internet Explorer 8 - -As of v4, Bootstrap no longer supports IE8. **If you require IE8 support, we recommend you use Bootstrap 3.** It's still supported by our team for bugfixes and documentation changes, but no new features will be added to it. - -Alternatively, you can add the some third party JavaScript to backfill support for the browser. You'll need the following: - -* [The HTML5 shiv](http://en.wikipedia.org/wiki/HTML5_Shiv) -* [Respond.js](https://github.com/scottjehl/Respond) -* [Rem unit polyfill](https://github.com/chuckcarpenter/REM-unit-polyfill) - -## IE Compatibility modes - -Bootstrap is not supported in the old Internet Explorer compatibility modes. To be sure you're using the latest rendering mode for IE, consider including the appropriate `` tag in your pages: - -{% highlight html %} - -{% endhighlight %} - -Confirm the document mode by opening the debugging tools: press F12 and check the "Document Mode". - -This tag is included in all of Bootstrap's documentation and examples to ensure the best rendering possible in each supported version of Internet Explorer. - -See [this StackOverflow question](https://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge) for more information. - -## Internet Explorer 10 in Windows Phone 8 - -Internet Explorer 10 in Windows Phone 8 versions older than [Update 3 (a.k.a. GDR3)](http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/10/14/introducing-windows-phone-preview-for-developers.aspx) doesn't differentiate **device width** from **viewport width** in `@-ms-viewport` at-rules, and thus doesn't properly apply the media queries in Bootstrap's CSS. To address this, you'll need to **include the following JavaScript to work around the bug**. - -{% highlight js %} -// Copyright 2014-2015 Twitter, Inc. -// Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) -if (navigator.userAgent.match(/IEMobile\/10\.0/)) { - var msViewportStyle = document.createElement('style') - msViewportStyle.appendChild( - document.createTextNode( - '@-ms-viewport{width:auto!important}' - ) - ) - document.querySelector('head').appendChild(msViewportStyle) -} -{% endhighlight %} - -For more information and usage guidelines, read [Windows Phone 8 and Device-Width](http://timkadlec.com/2013/01/windows-phone-8-and-device-width/). - -As a heads up, we include this in all of Bootstrap's documentation and examples as a demonstration. - -## Modals, navbars, and virtual keyboards - -### Overflow and scrolling - -Support for `overflow: hidden;` on the `` 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 `` content will begin to scroll. - -### Virtual keyboards - -Also, note that if you're using a fixed navbar or using inputs within a modal, iOS has a rendering bug that doesn't update the position of fixed elements when the virtual keyboard is triggered. A few workarounds for this include transforming your elements to `position: absolute;` or invoking a timer on focus to try to correct the positioning manually. This is not handled by Bootstrap, so it is up to you to decide which solution is best for your application. - -### Navbar Dropdowns - -The `.dropdown-backdrop` element isn't used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or [any other element which will fire a click event in iOS](https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile)). - -## Browser zooming - -Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds. - -## Sticky `:hover`/`:focus` on mobile -Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make `:hover` "sticky". In other words, `:hover` styles start applying after tapping an element and only stop applying after the user taps some other element. On mobile-first sites, this behavior is normally undesirable. - -Bootstrap includes a workaround for this, although it is disabled by default. By setting `$use-hover-media-query` to `true` when compiling from Sass, Bootstrap will use [mq4-hover-shim](https://github.com/twbs/mq4-hover-shim) to disable `:hover` styles in browsers that emulate hovering, thus preventing sticky `:hover` styles. There are some caveats to this workaround; see the shim's documentation for details. - -## Printing - -Even in some modern browsers, printing can be quirky. - -In particular, as of Chrome v32 and regardless of margin settings, Chrome uses a viewport width significantly narrower than the physical paper size when resolving media queries while printing a webpage. This can result in Bootstrap's extra-small grid being unexpectedly activated when printing. [See #12078 for some details.](https://github.com/twbs/bootstrap/issues/12078) Suggested workarounds: - -Also, as of Safari v8.0, fixed-width .containers can cause Safari to use an unusually small font size when printing. See #14868 for more details. One potential workaround for this is adding the following CSS:

- -{% highlight css %} -@media print { - .container { - width: auto; - } -} -{% endhighlight %} - -## Android stock browser - -Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general. - -#### Select menu - -On `` as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers. - -{% highlight html %} - -{% endhighlight %} - -Want to see an example? [Check out this JS Bin demo.](http://jsbin.com/OyaqoDO/2) - -## Validators - -In order to provide the best possible experience to old and buggy browsers, Bootstrap uses [CSS browser hacks](http://browserhacks.com) in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement. - -These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings. - -Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for [a certain Firefox bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072). -- cgit v1.2.3