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

"translations into a ..." links are pointing to the wrong URL - Meta viewport allows for zoom (proposed) - b4f0c3 #2170

Open
giacomo-petri opened this issue Mar 29, 2024 · 2 comments

Comments

@giacomo-petri
Copy link
Collaborator

Currently, the links within the notes of the Expectations section of Meta viewport allows for zoom rule, direct to the wrong resource: https://www.w3.org/TR/css-viewport-1/, where the algorithm differs significantly from the one used to calculate failing examples.

The new algorithm is as follows:
Set-Property matches the listed property names case-insensitively. The property-value strings are interpreted as follows:

  1. If a prefix of property-value can be converted to a number using strtod, the value will be that number. The remainder of the string is ignored.
  2. If the value can not be converted to a number as described above, the whole property-value string will be matched with the following strings case-insensitively: yes, no, device-width, device-height
  3. If the string did not match any of the known strings, the value is unknown.

In contrast, the previous algorithm operated as follows:

  1. Non-negative number values are translated to values, clamped to the range [0.1, 10]
  2. Negative number values are dropped
  3. yes is translated to 1
  4. device-width and device-height are translated to 10
  5. no and unknown values are translated to 0.1

Given that the rule is tailored to old devices (as newer devices typically ignore settings like user-scalable:no and maximum-scale:1), it seems necessary to point to the specific version of the CSS Device Adaptation Module Level 1. Without this specificity, the current wording of the rule lacks coherence.

If you concur with this assessment, I'm happy to create a PR to implement these amendments.

@giacomo-petri
Copy link
Collaborator Author

I'll also seize this opportunity to eliminate Failed Example 6, as it duplicates Failed Example 5.

@giacomo-petri giacomo-petri self-assigned this Apr 30, 2024
@giacomo-petri
Copy link
Collaborator Author

Failed Example 6 has already been removed via a previous PR, rendering the previous comment unnecessary.

@Jym77 @carlosapaduarte, regarding my initial point, I'd like to hear your thoughts. While addressing this, I noticed that other links are also outdated, with anchors no longer functional.

I'm contemplating whether it would be prudent to redirect all these links to the "previous" (it's still the current official one) version of CSS Device Adaptation Module Level 1 or if we should amend the rule based on the new CSS Viewport Module Level 1 working draft. However, considering the meta is specific to older devices, perhaps the rule no longer holds relevance if we point to the new documentation.

@giacomo-petri giacomo-petri removed their assignment Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant