[csswg-drafts] Pull Request: [css-viewport-1] number / percentage should be alternates, not optionals

keithamus has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-viewport-1] number / percentage should be alternates, not optionals  ==
The viewport spec's `zoom` style value has the following grammar:

`<number [0,∞]> || <percentage [0,∞]>`

I'm _sure_ this is not correct, this would allow for values such as `zoom: 100% 0.5`, `zoom: 0.75 50%`, and so on. AFAICT no browser supports such values and the spec does not describe what would happen if both values were supplied. I'm sure it is meant to be:

`<number [0,∞]> | <percentage [0,∞]>`

Which would mean _either_ a number _or_ a percentage, but not both. Please let me know if I'm wrong though.

See https://github.com/w3c/csswg-drafts/pull/12452


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 6 July 2025 18:02:19 UTC