-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mobile/iOS css revisions #37
Comments
maximum-scale is to prevent zooming in or zooming out when the mode is altered from portrait to landscape. "Mobile browsers handle orientation changes slightly differently. For example, Mobile Safari often just zooms the page when changing from portrait to landscape, instead of laying out the page as it would if originally loaded in landscape. If web developers want their scale settings to remain consistent when switching orientations on the iPhone, they must add a maximum-scale value to prevent this zooming, which has the sometimes-unwanted side effect of preventing users from zooming in: <meta name="viewport" content="initial-scale=1, maximum-scale=1">" from http://hacks.mozilla.org/2010/05/upcoming-changes-to-the-viewport-meta-tag-for-firefox-mobile/ |
from the man who recommended it.. http://paulirish.com/i/e020.png maximum scale looks on its way out. initial-scale, then.. retain? |
This is what Safari doc says about initial-scale: "The initial scale of the viewport as a multiplier. The default is calculated to fit the webpage in the visible area. The range is determined by the minimum-scale and maximum-scale properties. |
new comment:
|
I've discussed things with Matt Henry (@greenideas.. mobile expert) and Divya.. here's the plan:
and |
fixed in 7a33f72 |
I couldn't figure out why one of my sites using html5boilerplate was only 320px wide on the iPhone and was zoomed way in like this pic (on the right): http://developer.apple.com/library/safari/documentation/appleapplications/reference/safariwebcontent/Art/toosmall.jpg Also, background images were cut off outside the 320px wide window. I finally figured out that by changing initial-scale to auto, it fixed everything and zoomed out to show the whole 980px wide site. I also tried setting width to 980, but the combination of Mind you, I don't yet have a mobile version of my site, nor does it dynamically scale in width, however, I think the current default will be confusing to many people with 980px wide sites that can't be un-floated. I still think there's value to having the tag there, but I don't know if zooming in to 320px by default is what people will want. Or at least a comment with a link to the viewport docs might help: http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW28 Peter |
Peter, the viewport comment links to this issue, where your links (and issues) are visible. I think that is ample? Also, my view is when a site is zoomed out, a user would anyway click to zoom in, as at that view, the links and text are way too small to see. Do re-open if you think this is not satisfactory. |
initial-scale=1 I have an issue on iphone: for the divs that I have the width set at 100% the background color only gets spanned exactly the width of the device (while the whole website itself is displayed much larger than the device's width) using "auto" fixes it |
I tried all but nothing http:/kusadam.com |
(I have revised this ticket summary after the issue has been fixed for clarity)
After discussions with Matt Henry, a front-end dev mobile expert, recently from Yahoo!, now at Viget...
We concluded to drop maximum-scale=1 and leave text-size-adjust commented out by default.
max-scale doesnt let the user zoom in as they please. However it prevents some weird layout shifting when a device is changed from portrait to landscape. It doesn't seem like a good default.
initial-scale remains 1. It's default is 'auto' and I have no understanding why a mobile browser would set it to anything other than 1, but it's explicitly set for now..
Also.. worth watching http://people.opera.com/rune/TR/css-viewport/ (though it's unimplemented anywhere so far)
The text was updated successfully, but these errors were encountered: