Policy 1707 commit to LF
[policy/engine.git] / POLICY-SDK-APP / src / main / webapp / app / policyApp / CSS / bootstrap / docs / _includes / getting-started / browser-device-support.html
1 <div class="bs-docs-section">
2   <h1 id="support" class="page-header">Browser and device support</h1>
3   <p class="lead">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.</p>
4
5   <h2 id="support-browsers">Supported browsers</h2>
6   <p>Specifically, we support the <strong>latest versions</strong> of the following browsers and platforms. On Windows, <strong>we support Internet Explorer 8-11</strong>. More specific support information is provided below.</p>
7   <div class="table-responsive">
8     <table class="table table-bordered table-striped">
9       <thead>
10         <tr>
11           <td></td>
12           <th>Chrome</th>
13           <th>Firefox</th>
14           <th>Internet Explorer</th>
15           <th>Opera</th>
16           <th>Safari</th>
17         </tr>
18       </thead>
19       <tbody>
20         <tr>
21           <th scope="row">Android</th>
22           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
23           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
24           <td class="text-muted" rowspan="3" style="vertical-align: middle;">N/A</td>
25           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not Supported</td>
26           <td class="text-muted">N/A</td>
27         </tr>
28         <tr>
29           <th scope="row">iOS</th>
30           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
31           <td class="text-muted">N/A</td>
32           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not Supported</td>
33           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
34         </tr>
35         <tr>
36           <th scope="row">Mac OS X</th>
37           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
38           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
39           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
40           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
41         </tr>
42         <tr>
43           <th scope="row">Windows</th>
44           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
45           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
46           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
47           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
48           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not Supported</td>
49         </tr>
50       </tbody>
51     </table>
52   </div>
53   <p>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.</p>
54   <p>For a list of some of the browser bugs that Bootstrap has to grapple with, see our <a href="../browser-bugs/">Wall of browser bugs</a>.</p>
55
56   <h2 id="support-ie8-ie9">Internet Explorer 8 and 9</h2>
57   <p>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, <strong>Internet Explorer 8 requires the use of <a href="https://github.com/scottjehl/Respond">Respond.js</a> to enable media query support.</strong></p>
58   <div class="table-responsive">
59     <table class="table table-bordered table-striped">
60       <thead>
61         <tr>
62           <th class="col-xs-4">Feature</th>
63           <th class="col-xs-4">Internet Explorer 8</th>
64           <th class="col-xs-4">Internet Explorer 9</th>
65         </tr>
66       </thead>
67       <tbody>
68         <tr>
69           <th scope="row"><code>border-radius</code></th>
70           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not supported</td>
71           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
72         </tr>
73         <tr>
74           <th scope="row"><code>box-shadow</code></th>
75           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not supported</td>
76           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported</td>
77         </tr>
78         <tr>
79           <th scope="row"><code>transform</code></th>
80           <td class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not supported</td>
81           <td class="text-success"><span class="glyphicon glyphicon-ok" aria-hidden="true"></span> Supported, with <code>-ms</code> prefix</td>
82         </tr>
83         <tr>
84           <th scope="row"><code>transition</code></th>
85           <td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not supported</td>
86         </tr>
87         <tr>
88           <th scope="row"><code>placeholder</code></th>
89           <td colspan="2" class="text-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Not supported</td>
90         </tr>
91       </tbody>
92     </table>
93   </div>
94
95   <p>Visit <a href="http://caniuse.com/">Can I use...</a> for details on browser support of CSS3 and HTML5 features.</p>
96
97   <h2 id="support-ie8-respondjs">Internet Explorer 8 and Respond.js</h2>
98   <p>Beware of the following caveats when using Respond.js in your development and production environments for Internet Explorer 8.</p>
99   <h3 id="respond-js-x-domain">Respond.js and cross-domain CSS</h3>
100   <p>Using Respond.js with CSS hosted on a different (sub)domain (for example, on a CDN) requires some additional setup. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#cdnx-domain-setup">See the Respond.js docs</a> for details.</p>
101   <h3 id="respond-file-proto">Respond.js and <code>file://</code></h3>
102   <p>Due to browser security rules, Respond.js doesn't work with pages viewed via the <code>file://</code> protocol (like when opening a local HTML file). To test responsive features in IE8, view your pages over HTTP(S). <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
103   <h3 id="respond-import">Respond.js and <code>@import</code></h3>
104   <p>Respond.js doesn't work with CSS that's referenced via <code>@import</code>. In particular, some Drupal configurations are known to use <code>@import</code>. <a href="https://github.com/scottjehl/Respond/blob/master/README.md#support--caveats">See the Respond.js docs</a> for details.</p>
105
106   <h2 id="support-ie8-box-sizing">Internet Explorer 8 and box-sizing</h2>
107   <p>IE8 does not fully support <code>box-sizing: border-box;</code> when combined with <code>min-width</code>, <code>max-width</code>, <code>min-height</code>, or <code>max-height</code>. For that reason, as of v3.0.1, we no longer use <code>max-width</code> on <code>.container</code>s.</p>
108
109   <h2 id="support-ie8-font-face">Internet Explorer 8 and @font-face</h2>
110   <p>IE8 has some issues with <code>@font-face</code> when combined with <code>:before</code>. Bootstrap uses that combination with its Glyphicons. If a page is cached, and loaded without the mouse over the window (i.e. hit the refresh button or load something in an iframe) then the page gets rendered before the font loads. Hovering over the page (body) will show some of the icons and hovering over the remaining icons will show those as well. <a href="https://github.com/twbs/bootstrap/issues/13863">See issue #13863</a> for details.</p>
111
112   <h2 id="support-ie-compatibility-modes">IE Compatibility modes</h2>
113   <p>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 <code>&lt;meta&gt;</code> tag in your pages:</p>
114 {% highlight html %}
115 <meta http-equiv="X-UA-Compatible" content="IE=edge">
116 {% endhighlight %}
117   <p>Confirm the document mode by opening the debugging tools: press <kbd>F12</kbd> and check the "Document Mode".</p>
118   <p>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.</p>
119   <p>See <a href="http://stackoverflow.com/questions/6771258/whats-the-difference-if-meta-http-equiv-x-ua-compatible-content-ie-edge">this StackOverflow question</a> for more information.</p>
120
121   <h2 id="support-ie10-width">Internet Explorer 10 in Windows 8 and Windows Phone 8</h2>
122   <p>Internet Explorer 10 doesn't differentiate <strong>device width</strong> from <strong>viewport width</strong>, 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:</p>
123 {% highlight scss %}
124 @-ms-viewport       { width: device-width; }
125 {% endhighlight %}
126   <p>However, this doesn't work for devices running Windows Phone 8 versions older than <a href="http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/10/14/introducing-windows-phone-preview-for-developers.aspx">Update 3 (a.k.a. GDR3)</a>, as it causes such devices to show a mostly desktop view instead of narrow "phone" view. To address this, you'll need to <strong>include the following CSS and JavaScript to work around the bug</strong>.</p>
127 {% highlight scss %}
128 @-webkit-viewport   { width: device-width; }
129 @-moz-viewport      { width: device-width; }
130 @-ms-viewport       { width: device-width; }
131 @-o-viewport        { width: device-width; }
132 @viewport           { width: device-width; }
133 {% endhighlight %}
134
135 {% highlight js %}
136 if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
137   var msViewportStyle = document.createElement('style')
138   msViewportStyle.appendChild(
139     document.createTextNode(
140       '@-ms-viewport{width:auto!important}'
141     )
142   )
143   document.querySelector('head').appendChild(msViewportStyle)
144 }
145 {% endhighlight %}
146   <p>For more information and usage guidelines, read <a href="http://timkadlec.com/2013/01/windows-phone-8-and-device-width/">Windows Phone 8 and Device-Width</a>.</p>
147   <p>As a heads up, we include this in all of Bootstrap's documentation and examples as a demonstration.</p>
148
149   <h2 id="support-safari-percentages">Safari percent rounding</h2>
150   <p>The rendering engine of versions of Safari prior to v7.1 for OS X and Safari for iOS v8.0 had some trouble with the number of decimal places used in our <code>.col-*-1</code> grid classes. So if you had 12 individual grid columns, you'd notice that they came up short compared to other rows of columns. Besides upgrading Safari/iOS, you have some options for workarounds:</p>
151   <ul>
152     <li>Add <code>.pull-right</code> to your last grid column to get the hard-right alignment</li>
153     <li>Tweak your percentages manually to get the perfect rounding for Safari (more difficult than the first option)</li>
154   </ul>
155
156   <h2 id="support-fixed-position-keyboards">Modals, navbars, and virtual keyboards</h2>
157   <h3>Overflow and scrolling</h3>
158   <p>Support for <code>overflow: hidden</code> on the <code>&lt;body&gt;</code> 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 <code>&lt;body&gt;</code> content will begin to scroll.</p>
159   <h3>Virtual keyboards</h3>
160   <p>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 <code>position: absolute</code> 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.</p>
161   <h3>Navbar Dropdowns</h3>
162   <p>The <code>.dropdown-backdrop</code> 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 <a href="https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile">any other element which will fire a click event in iOS</a>).</p>
163
164   <h2 id="support-browser-zooming">Browser zooming</h2>
165   <p>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.</p>
166
167   <h2 id="support-sticky-hover-mobile">Sticky <code>:hover</code>/<code>:focus</code> on mobile</h2>
168   <p>Even though real hovering isn't possible on most touchscreens, most mobile browsers emulate hovering support and make <code>:hover</code> "sticky". In other words, <code>:hover</code> styles start applying after tapping an element and only stop applying after the user taps some other element. This can cause Bootstrap's <code>:hover</code> states to become unwantedly "stuck" on such browsers. Some mobile browsers also make <code>:focus</code> similarly sticky. There is currently no simple workaround for these issues other than removing such styles entirely.</p>
169
170   <h2 id="support-printing">Printing</h2>
171   <p>Even in some modern browsers, printing can be quirky.</p>
172   <p>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. <a href="https://github.com/twbs/bootstrap/issues/12078">See #12078 for some details.</a> Suggested workarounds:</p>
173   <ul>
174     <li>Embrace the extra-small grid and make sure your page looks acceptable under it.</li>
175     <li>Customize the values of the <code>@screen-*</code> Less variables so that your printer paper is considered larger than extra-small.</li>
176     <li>Add custom media queries to change the grid size breakpoints for print media only.</li>
177   </ul>
178   <p>Also, as of Safari v8.0, fixed-width <code>.container</code>s can cause Safari to use an unusually small font size when printing. See <a href="https://github.com/twbs/bootstrap/issues/14868">#14868</a> for more details. One potential workaround for this is adding the following CSS:</p>
179 {% highlight css %}
180 @media print {
181   .container {
182     width: auto;
183   }
184 }
185 {% endhighlight %}
186
187   <h2 id="support-android-stock-browser">Android stock browser</h2>
188   <p>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.</p>
189   <h3>Select menus</h3>
190   <p>On <code>&lt;select&gt;</code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. (See <a href="http://stackoverflow.com/questions/14744437/html-select-box-not-showing-drop-down-arrow-on-android-version-4-0-when-set-with">this StackOverflow question</a> for details.) Use the snippet of code below to remove the offending CSS and render the <code>&lt;select&gt;</code> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
191 {% highlight html %}
192 <script>
193 $(function () {
194   var nua = navigator.userAgent
195   var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
196   if (isAndroid) {
197     $('select.form-control').removeClass('form-control').css('width', '100%')
198   }
199 })
200 </script>
201 {% endhighlight %}
202   <p>Want to see an example? <a href="http://jsbin.com/kuvoz/1">Check out this JS Bin demo.</a></p>
203
204   <h2 id="support-validators">Validators</h2>
205   <p>In order to provide the best possible experience to old and buggy browsers, Bootstrap uses <a href="http://browserhacks.com">CSS browser hacks</a> 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.</p>
206   <p>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.</p>
207   <p>Our HTML docs likewise have some trivial and inconsequential HTML validation warnings due to our inclusion of a workaround for <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=654072">a certain Firefox bug</a>.</p>
208 </div>