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

Add meta viewport support data #25392

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

pepelsbey
Copy link
Member

@pepelsbey pepelsbey commented Dec 12, 2024

Summary

Adds missing support data for <meta name="viewport">.

Test results and supporting details

This PR assumes that Mobile Safari 3 for iOS shipped the first <meta name="viewport"> implementation, and all later released mobile browsers followed.

There’s a viewport-fit feature that Safari 11 presumably shipped. I just learned that Chrome is planning to ship it soon, too.

Related issues

Fixes #25311

@github-actions github-actions bot added data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML size:l [PR only] 101-1000 LoC changed labels Dec 12, 2024
@caugner caugner changed the title Add meta viewport support data Add meta viewport attributes Dec 13, 2024
@caugner caugner changed the title Add meta viewport attributes Add meta viewport support data Dec 13, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this PR seems to missing some references for the determined support statuses.

html/elements/meta.json Outdated Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
html/elements/meta.json Show resolved Hide resolved
@pepelsbey
Copy link
Member Author

pepelsbey commented Dec 14, 2024

Overall, this PR seems to missing some references for the determined support statuses.

As we discussed on the BCD call, this PR is a starting point in a long investigation and testing process. All early browser versions I provided have some degree of uncertainty unless we actually test it. Unfortunately, I don’t have the resources for such testing. But I think “the first best guess” would still be useful.

What makes you think [browser] supported this?

When it comes to mobile browsers, the meta viewport was an opt-in solution (invented by Apple) for browsers to render adequately scaled pages on mobile. All early mobile browsers had to mimic Safari’s viewport implementation to be compatible with the mobile web of that time. Unfortunately, the early release notes are lacking details and cannot be used in the “if it’s not mentioned, then it’s not there” way.

That’s why the first best guess here is:

  1. Safari 3
  2. Firefox 4
  3. Chrome 18

The first mobile browsers of that time.

By the way, here’s another PPK’s compat table I found that might be helpful.

@pepelsbey
Copy link
Member Author

How did you determine [interactive-widget] support in Chrome/Firefox Android?

I haven’t done any testing. I only have release notes:

@caugner
Copy link
Contributor

caugner commented Dec 16, 2024

As we discussed on the BCD call, this PR is a starting point in a long investigation and testing process. All early browser versions I provided have some degree of uncertainty unless we actually test it. Unfortunately, I don’t have the resources for such testing. But I think “the first best guess” would still be useful.

My apologies, if we discussed to add specific version numbers, although we're not certain, then let's do this. Otherwise, I would prefer to test in some version we're certain it's supported, add a range using that version instead, and create an issue with the used test case for further narrowing down the versions in the future.

@pepelsbey
Copy link
Member Author

if we discussed to add specific version numbers, although we're not certain, then let's do this

Yep, there’s a high level of certainty that the initial mobile browsers were shipped with the viewport support. We can revisit it once we’ve done the testing. I brought it up again on today’s BCD call and got positive feedback from @Elchi3.

With all that, I’m planning to resolve all comments regarding the initial support versions and address the spec_url ones.

@caugner

This comment was marked as outdated.

@pepelsbey pepelsbey requested a review from caugner January 17, 2025 16:09
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM (*), but I have two remaining questions:

  1. Shouldn't all these viewport-related content values go below the viewport feature, even if syntactically they are values of the content attribute? (@Elchi3 Wdyt?)
  2. Should any of those version numbers be replaced with a range (≤x) if we're uncertain whether the feature was added in that exact version?

(*) I have only spot-checked some of the data based on the summary given in the referenced issue. If we already had the internal annotations field, we could record the confidence or reasoning for each support statement, but unfortunately we don't have it yet.

@caugner
Copy link
Contributor

caugner commented Jan 30, 2025

@Elchi3 @ddbeck @queengooborg Do you have an opinion on where the viewport-related content attribute values should go? (See my comment above.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML size:l [PR only] 101-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Viewport <meta> element - missing
2 participants