-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
fix(v1,v2): Add initial-scale=1.0 to all meta viewport tags #3290
Conversation
Deploy preview for docusaurus-2 ready! Built with commit 3371652 |
Hi, Not very familiar with this problem.
What authoritative source claims that? I think the change should be fine but try to avoid something bad by mistake :) |
@@ -2,7 +2,7 @@ | |||
<html lang="en"> | |||
<head> | |||
<meta charset="utf-8"> | |||
<meta name="viewport" content="width=device-width"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw was wondering, is this file still useful?
wasn't it you that migrated from EJS to ETA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha yes it was. Actually, this file is used by https://github.com/jantimon/html-webpack-plugin, which by default uses a template engine that they call EJS but is really just lodash.template 🤷♂️
Maybe I should request to migrate that to Eta too 😀
I can't say for positive, but I'm pretty sure it won't. I guess the best way is just to test the Docusaurus v2 site? The deploy preview for this PR looks good to me.
Here are a few I found after a quick Google Search:
Hopefully this PR will just fix a few edge cases like mine without negatively impacting anyone |
So, this seems fine, let's merge, but if people complain I'll likely revert |
Motivation
When viewing my Docusaurus site (https://squirrelly.js.org) on a mobile device, it is correctly sized on first load. Almost immediately after that, however, it resizes so that it isn't the full width of the page (see below). Changing
<meta name="viewport" content="width=device-width">
to<meta name="viewport" content="width=device-width, initial-scale=1.0">
solves the problem.Strangely, I can't reproduce the issue on other Docusaurus sites. However, since I believe it's best practice to include
initial-scale=1
, I figured I'd submit the PR anyway.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Visually ensure that Docusaurus doesn't change its appearance.