Skip to content

Commit 35898ba

Browse files
author
Rafael J. Staib
committed
Add fix for the viewport issue on mobie ie10
1 parent bfc477b commit 35898ba

14 files changed

+86
-46
lines changed

V2/V2.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<Content Include="content\images\glyphicons-halflings.png" />
7171
<Content Include="content\images\html5.png" />
7272
<Content Include="content\images\lightweight.png" />
73+
<Content Include="content\viewport-fix-mobile-ie10.css" />
7374
<Content Include="index.html" />
7475
<Content Include="scripts\base.js">
7576
<DependentUpon>base.js.bundle</DependentUpon>
@@ -82,6 +83,7 @@
8283
<Content Include="scripts\html5shiv.js" />
8384
<Content Include="scripts\jquery-1.9.1.min.js" />
8485
<Content Include="scripts\social.js" />
86+
<Content Include="scripts\viewport-fix-mobile-ie10.js" />
8587
<Content Include="Web.config" />
8688
</ItemGroup>
8789
<ItemGroup>

V2/V2.v11.suo

-12 KB
Binary file not shown.

V2/content/base.css

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
/*!
1+
@-webkit-viewport { width: device-width }
2+
@-moz-viewport { width: device-width }
3+
@-ms-viewport { width: device-width }
4+
@-o-viewport { width: device-width }
5+
@viewport { width: device-width }
6+
/*!
27
* Bootstrap v2.3.2
38
*
49
* Copyright 2012 Twitter, Inc
@@ -1011,26 +1016,31 @@ h1, h2, h3, h4, h5, h6
10111016

10121017
.sitewrapper > .content
10131018
{
1014-
padding: 2.857em 0 4.286em;
1019+
padding: 2.857em 0 1.429em;
10151020
}
10161021

10171022
.sitewrapper > .content.startpage
10181023
{
10191024
text-align: center;
10201025
}
10211026

1022-
.sitewrapper > .content.startpage h2
1027+
.sitewrapper > .content.startpage .box
10231028
{
1024-
font-size: 1.714em;
1025-
line-height: 1.208em;
1026-
margin: 0.833em 0 0.667em;
1029+
margin-bottom: 2.857em;
10271030
}
10281031

1029-
.sitewrapper > .content.startpage p
1030-
{
1031-
font-size: 1.143em;
1032-
line-height: 1.250em;
1033-
}
1032+
.sitewrapper > .content.startpage .box > h2
1033+
{
1034+
font-size: 1.714em;
1035+
line-height: 1.208em;
1036+
margin: 0.833em 0 0.667em;
1037+
}
1038+
1039+
.sitewrapper > .content.startpage .box > p
1040+
{
1041+
font-size: 1.143em;
1042+
line-height: 1.250em;
1043+
}
10341044

10351045
body > footer
10361046
{
@@ -1155,15 +1165,15 @@ body > footer
11551165
font-weight: normal;
11561166
}
11571167

1158-
@media (max-width: 1199px)
1168+
@media only screen and (max-width: 1199px)
11591169
{
11601170
.sitewrapper > header > p
11611171
{
11621172
width: 80%;
11631173
}
11641174
}
11651175

1166-
@media (max-width: 979px)
1176+
@media only screen and (max-width: 979px)
11671177
{
11681178
.sitewrapper
11691179
{
@@ -1176,9 +1186,9 @@ body > footer
11761186
box-shadow: none;
11771187
}
11781188

1179-
.sitewrapper > .content.startpage h2
1189+
.sitewrapper > .content.startpage .box > h2
11801190
{
1181-
font-size: 20px;
1191+
font-size: 1.429em;
11821192
}
11831193

11841194
.navbar
@@ -1187,17 +1197,17 @@ body > footer
11871197
}
11881198
}
11891199

1190-
@media (max-width: 767px)
1200+
@media only screen and (max-width: 767px)
11911201
{
11921202
.sitewrapper > .content
11931203
{
11941204
padding-left: 1.429em;
11951205
padding-right: 1.429em;
11961206
}
11971207

1198-
.sitewrapper > .content.startpage h2
1208+
.sitewrapper > .content.startpage .box > h2
11991209
{
1200-
font-size: 28px;
1210+
font-size: 2em;
12011211
}
12021212

12031213
.navbar > .navbar-inner h1
@@ -1227,7 +1237,7 @@ body > footer
12271237
}
12281238
}
12291239

1230-
@media (max-width: 479px)
1240+
@media only screen and (max-width: 479px)
12311241
{
12321242

12331243
}

V2/content/base.css.bundle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<bundle minify="true" runOnBuild="true" output="base.css">
33
<!--The order of the <file> elements determines the order of them when bundled.-->
4+
<file>/content/viewport-fix-mobile-ie10.css</file>
45
<file>/content/bootstrap.min.css</file>
56
<file>/content/site.css</file>
67
</bundle>

V2/content/base.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

V2/content/site.css

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -136,26 +136,31 @@ h1, h2, h3, h4, h5, h6
136136

137137
.sitewrapper > .content
138138
{
139-
padding: 2.857em 0 4.286em;
139+
padding: 2.857em 0 1.429em;
140140
}
141141

142142
.sitewrapper > .content.startpage
143143
{
144144
text-align: center;
145145
}
146146

147-
.sitewrapper > .content.startpage h2
147+
.sitewrapper > .content.startpage .box
148148
{
149-
font-size: 1.714em;
150-
line-height: 1.208em;
151-
margin: 0.833em 0 0.667em;
149+
margin-bottom: 2.857em;
152150
}
153151

154-
.sitewrapper > .content.startpage p
155-
{
156-
font-size: 1.143em;
157-
line-height: 1.250em;
158-
}
152+
.sitewrapper > .content.startpage .box > h2
153+
{
154+
font-size: 1.714em;
155+
line-height: 1.208em;
156+
margin: 0.833em 0 0.667em;
157+
}
158+
159+
.sitewrapper > .content.startpage .box > p
160+
{
161+
font-size: 1.143em;
162+
line-height: 1.250em;
163+
}
159164

160165
body > footer
161166
{
@@ -280,15 +285,15 @@ body > footer
280285
font-weight: normal;
281286
}
282287

283-
@media (max-width: 1199px)
288+
@media only screen and (max-width: 1199px)
284289
{
285290
.sitewrapper > header > p
286291
{
287292
width: 80%;
288293
}
289294
}
290295

291-
@media (max-width: 979px)
296+
@media only screen and (max-width: 979px)
292297
{
293298
.sitewrapper
294299
{
@@ -301,9 +306,9 @@ body > footer
301306
box-shadow: none;
302307
}
303308

304-
.sitewrapper > .content.startpage h2
309+
.sitewrapper > .content.startpage .box > h2
305310
{
306-
font-size: 20px;
311+
font-size: 1.429em;
307312
}
308313

309314
.navbar
@@ -312,17 +317,17 @@ body > footer
312317
}
313318
}
314319

315-
@media (max-width: 767px)
320+
@media only screen and (max-width: 767px)
316321
{
317322
.sitewrapper > .content
318323
{
319324
padding-left: 1.429em;
320325
padding-right: 1.429em;
321326
}
322327

323-
.sitewrapper > .content.startpage h2
328+
.sitewrapper > .content.startpage .box > h2
324329
{
325-
font-size: 28px;
330+
font-size: 2em;
326331
}
327332

328333
.navbar > .navbar-inner h1
@@ -352,7 +357,7 @@ body > footer
352357
}
353358
}
354359

355-
@media (max-width: 479px)
360+
@media only screen and (max-width: 479px)
356361
{
357362

358363
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@-webkit-viewport { width: device-width }
2+
@-moz-viewport { width: device-width }
3+
@-ms-viewport { width: device-width }
4+
@-o-viewport { width: device-width }
5+
@viewport { width: device-width }

V2/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<meta name="twitter:description" content="A powerful jQuery wizard plugin that supports accessibility and HTML5.">
2626
<meta name="twitter:image" content="http://rstaib.github.io/jquery-steps/images/social.png">
2727

28+
<meta name="application-name" content="jQuery Steps" />
29+
<meta name="msapplication-tooltip" content="jQuery Steps" />
30+
2831
<!--link rel="shortcut icon" href="~/favicon.png">
2932
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
3033
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
@@ -75,17 +78,17 @@ <h1>jQuery Steps</h1>
7578

7679
<div class="content startpage">
7780
<div class="row-fluid">
78-
<div class="span4">
81+
<div class="span4 box">
7982
<img src="content/images/lightweight.png">
8083
<h2>Lightweight Footprint</h2>
8184
<p>Only 2.5 KB minified & gzipped</p>
8285
</div>
83-
<div class="span4">
86+
<div class="span4 box">
8487
<img src="content/images/html5.png">
8588
<h2>HTML5 & Accessibility Support</h2>
8689
<p>...</p>
8790
</div>
88-
<div class="span4">
91+
<div class="span4 box">
8992
<img src="content/images/crossbrowser.png">
9093
<h2>Cross Browser Support</h2>
9194
<p>IE, Firefox, Chrome, Safari, Opera and more</p>
Binary file not shown.

V2/scripts/base.js

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

V2/scripts/base.js.bundle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<bundle minify="true" runOnBuild="true" output="base.js">
33
<!--The order of the <file> elements determines the order of them when bundled.-->
4+
<file>/scripts/viewport-fix-mobile-ie10.js</file>
45
<file>/scripts/jquery-1.9.1.min.js</file>
56
<file>/scripts/bootstrap.min.js</file>
67
<file>/scripts/social.js</file>

V2/scripts/base.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

V2/scripts/base.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if (navigator.userAgent.match(/IEMobile\/10\.0/))
2+
{
3+
var msViewportStyle = document.createElement("style");
4+
msViewportStyle.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}"));
5+
document.getElementsByTagName("head")[0].appendChild(msViewportStyle);
6+
}

0 commit comments

Comments
 (0)