From 287fdf83818da096559b7c56732e1bc41c25418e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 6 Aug 2013 15:21:26 -0700 Subject: [PATCH 1/2] fixes #9162: add mention of Windows Phone 8 and IE10 bugs with responsive foo --- getting-started.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/getting-started.html b/getting-started.html index ef0bdbf53e1a..4f60acc7dd32 100644 --- a/getting-started.html +++ b/getting-started.html @@ -149,6 +149,29 @@

IE Compatibility modes

{% endhighlight %}

See this StackOverflow question for more information.

+ +

Windows Phone 8 and Internet Explorer 10

+

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.

+{% highlight css %} +@-webkit-viewport { width: device-width; } +@-moz-viewport { width: device-width; } +@-ms-viewport { width: device-width; } +@-o-viewport { width: device-width; } +@viewport { width: device-width; } +{% endhighlight %} + +{% highlight js %} +if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement("style"); + msViewportStyle.appendChild( + document.createTextNode( + "@-ms-viewport{width:auto!important}" + ) + ); + document.getElementsByTagName("head")[0].appendChild(msViewportStyle); +} +{% endhighlight %} +

For more information and usage guidelines, read Windows Phone 8 and Device-Width

From 726bc028857ad9e5a9e6255cd9a638b051ad8ba7 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 6 Aug 2013 15:52:06 -0700 Subject: [PATCH 2/2] For @cvrebert --- getting-started.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting-started.html b/getting-started.html index 4f60acc7dd32..ee9da8629903 100644 --- a/getting-started.html +++ b/getting-started.html @@ -171,7 +171,7 @@

Windows Phone 8 and Internet Explorer 10

document.getElementsByTagName("head")[0].appendChild(msViewportStyle); } {% endhighlight %} -

For more information and usage guidelines, read Windows Phone 8 and Device-Width

+

For more information and usage guidelines, read Windows Phone 8 and Device-Width.