-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Remove initial-scale=1 from <meta name="viewport"> #5706
Conversation
initial-scale=1 was propagated widely by https://css-tricks.com/probably-use-initial-scale1/ (though css-tricks itself doesn't use it). It was necessary to work around the orientation change bug in Safari for iOS < 9. iOS 9 was released in 2015 and iOS < 9 usage is extremely low in 2022. https://webhint.io/docs/user-guide/hints/hint-meta-viewport/
|
TIL! Thanks |
Hey @ivan I don't think the
Screencast.from.27-09-23.10.41.10.webm
|
Google writes on their lighthouse page:
and the example they provide as best practice is: <meta name="viewport" content="width=device-width, initial-scale=1"> Adding back |
The shift in viewport scaling in Chrome when scale is unset: Screencast.from.27-09-23.14.33.39.webm |
I'm using the <svelte:head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</svelte:head> |
This saves some bytes and avoids propagating an obsolete workaround. The initial scale already defaults to 1.
initial-scale=1
inviewport
was propagated widely by https://css-tricks.com/probably-use-initial-scale1/ (though css-tricks itself doesn't use it). It was necessary to work around the orientation change bug in Safari for iOS < 9. iOS 9 was released in 2015 and iOS < 9 usage is extremely low in 2022.https://webhint.io/docs/user-guide/hints/hint-meta-viewport/ seems authoritative about it no longer being necessary.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0