Skip to content
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

[Feature] Create code action for "Correct Viewport" hint #5213

Open
mliao95 opened this issue Jun 13, 2022 · 0 comments
Open

[Feature] Create code action for "Correct Viewport" hint #5213

mliao95 opened this issue Jun 13, 2022 · 0 comments

Comments

@mliao95
Copy link
Contributor

mliao95 commented Jun 13, 2022

See documentation on hint here: https://webhint.io/docs/user-guide/hints/hint-meta-viewport/

Triggers + Code Action solutions (in HTML file):

  • viewport meta tag is not specified in <head>
    • Code Action: add name="viewport" attribute to existing meta tag or create new meta tag containing valid attribute
  • viewport meta tag contains unknown property or disallowed property
    • Code Action: Delete unknown or disallowed property
  • viewport meta tag contains invalid property
    • Code Action: If invalid property has suggested value, replace invalid property value with suggested value. Otherwise, delete.
  • viewport meta tag contains fixed width value
    • Code Action: change width value to device-width
  • viewport meta tag contains fixed initial-scale value different than 1
    • Code Action: Set initial-scale value to 1
  • there are multiple viewport meta tags
    • Code Action: Either delete second viewport meta tag or allow user to choose one to keep and delete the rest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant