r113463 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113462‎ | r113463 | r113464 >
Date:11:03, 9 March 2012
Author:jdlrobson
Status:resolved (Comments)
Tags:
Comment:
use max-width for viewport not width

setting width to device-width can have issues where
the page is viewed in a webview as part of an app for
example. We should actually use max-width here as this
allows the screen to be smaller if there is not enough
space

this fixes bug 31214
Modified paths:
  • /trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/templates/ApplicationTemplate.php
@@ -54,7 +54,7 @@
5555 <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version=1331257310' media='all' rel='Stylesheet' type='text/css' />
5656 <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1331257310' media='all' rel='Stylesheet' type='text/css' />
5757 {$filePageStyle}
58 - <meta name="viewport" content="width=device-width, initial-scale=1.0">
 58+ <meta name="viewport" content="max-width=device-width, initial-scale=1.0">
5959 {$appleTouchIconTag}
6060 {$jQueryScript}
6161 <script type='text/javascript'>

Sign-offs

UserFlagDate
Laberkisteinspected23:16, 13 March 2012

Follow-up revisions

RevisionCommit summaryAuthorDate
r113693remove unrecognised max-width property...jdlrobson00:21, 13 March 2012
r113768MFT r113463, r113471, r113472, r113486, r113512, r113553awjrichards22:01, 13 March 2012
r113773Revert r113768, merge included bad rev r113463awjrichards22:33, 13 March 2012
r114200r113463, r113465, r113466, r113469, r113470, r113471, r113472awjrichards22:16, 19 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98566fix for bug 31214 - ipad apps - mobile article does not fit if webview width ...preilly21:19, 30 September 2011

Comments

#Comment by Awjrichards (talk | contribs)   22:33, 13 March 2012

Causes the following error in Chrome: "Viewport argument key "max-width" not recognized and ignored."

#Comment by Jdlrobson (talk | contribs)   22:51, 13 March 2012

See r113693

#Comment by Jdlrobson (talk | contribs)   22:51, 13 March 2012

See r113693

#Comment by Awjrichards (talk | contribs)   22:58, 13 March 2012

Cool, thanks! In the future, you can specify "Followup r113463" (or whatever revision you're following up on) in the commit message or do it manually in the code review tool if you forget in the commit message. This helps reviewers/deployers pick up fixes for broken things like this :)

#Comment by Jdlrobson (talk | contribs)   23:15, 13 March 2012

No worries think I forgot here! Was in the zone :)

Status & tagging log