Skip to content

Instantly share code, notes, and snippets.

@jalbertbowden
Forked from stowball/wp8-ie10-fix.js
Last active December 24, 2015 04:19
Show Gist options
  • Select an option

  • Save jalbertbowden/6742733 to your computer and use it in GitHub Desktop.

Select an option

Save jalbertbowden/6742733 to your computer and use it in GitHub Desktop.
@-ms-viewport{
width: device-width;
}
<meta name="viewport" content="width=device-width, initial-scale=1" />
(function() {
if ("-ms-user-select" in document.documentElement.style && 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);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment