joshbuchea / HEAD

A simple guide to HTML <head> elements
https://htmlhead.dev
30k stars 1.92k forks source link

viewport meta tag doesn't reflect current best use for iOS #198

Closed e110c0 closed 5 years ago

e110c0 commented 6 years ago

with the iPhone X being over a year old and the iPad now having safe areas as well, changing the default viewport tag to something like 'initial-scale=1, viewport-fit=cover' would be more appropriate.

scottaohara commented 6 years ago

thanks!

joshbuchea commented 5 years ago

Hey gentlemen, I'm not sure that viewport-fit=cover is a good default or that removing shrink-to-fit=no is necessary. Do either of you have any references to support these changes being better defaults? I'm going to go ahead and revert for now. In the future I would prefer to discuss changes to the recommended defaults. Thanks!

e110c0 commented 5 years ago

I did not expect that change to just be merged TBH. I'd rather start a discussion and find out what a good default is.

Adding it to the documentation of what can be done and what it is for might be the better solution.

scottaohara commented 5 years ago

yup. i jumped the gun here by not providing reasoning why i merged the change.

Upon review / testing on iOS devices running v10.3, v11.x and 12.1 shrink-to-fit is no longer recognized or needed.

I'll be posting a write up about this soon.

scottaohara commented 5 years ago

Report: https://www.scottohara.me/blog/2018/12/11/shrink-to-fit.html which contains more testing of earlier iOS versions.

tldr; shrink-to-fit=no became irrelevant during the iOS 9.3 lifecyle and beyond.

scottaohara commented 5 years ago

FWIW: pull request to remove shrink-to-fit from HTML5 boiler plate

joshbuchea commented 5 years ago

Apologies for the late response, open source has been low on my list of priorities lately. Excellent writeup @scottaohara 👌 I'm on-board, let's remove shink-to-fit=no.

joshbuchea commented 5 years ago

Also — FWIW @e110c0 I think we definitely should include viewport-fit=cover somewhere, just not sure if it belongs in the recommended minimum as it seems there are reports of it breaking websites by covering navigation and other controls in some cases.

scottaohara commented 5 years ago

no worries @joshbuchea :)

joshbuchea commented 5 years ago

@scottaohara I'm not sure how large this dataset is but, iOS 9.0-9.2.x usage is currently only @ 0.17% https://data.apteligent.com/ios/

scottaohara commented 5 years ago

oh that's interesting. thank you @joshbuchea. going to update my article with that link. Coupled with the one I already had in the article, more data points the better. :)

joshbuchea commented 5 years ago

Oh yeah and almost forgot — @scottaohara thank you for doing that research and for publishing your findings 💯

scottaohara commented 5 years ago

i like to share :)

e110c0 commented 5 years ago

@scottaohara totally agree it's not a recommended minimum.

Having all possible options in the documentation would be nice. I still haven't figured out all pitfalls of it, so not comfortable with creating a PR at the moment