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

feat(css): Update synatx for css zoom property #901

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions css/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -10853,18 +10853,18 @@
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/z-index"
},
"zoom": {
"syntax": "normal | reset | <number> | <percentage>",
"syntax": "normal | reset | <number [0,∞]> || <percentage [0,∞]>",
Copy link
Contributor Author

@skyclouds2001 skyclouds2001 Jan 18, 2025

Choose a reason for hiding this comment

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

the syntax for the spec is <number [0,∞]> || <percentage [0,∞]>, while the non-standard normal keyword is supported in chrome, firefox and safari per manually test; the non-standard reset keyword is supported in safari per bcd and manually test

notice since double bar has precedence over the single bar, normal | reset | <number [0,∞]> || <percentage [0,∞]> is equal to normal | reset | [ <number [0,∞]> || <percentage [0,∞]> ]

see also mdn/content#37705

"media": "visual",
"inherited": false,
"animationType": "notAnimatable",
"percentages": "no",
"percentages": "convertedToNumber",
"groups": [
"Microsoft Extensions"
],
"initial": "normal",
"initial": "1",
"appliesto": "allElements",
Copy link
Contributor Author

@skyclouds2001 skyclouds2001 Jan 18, 2025

Choose a reason for hiding this comment

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

while spec says it as all property values of all elements, this should just be all elements

the target for appliesto should should be elements per its defnition

"computed": "asSpecified",
"order": "uniqueOrder",
"computed": "asSpecifiedButWithPercentageConvertedToTheEquivalentNumber",
"order": "perGrammar",
"status": "standard",
"mdn_url": "https://developer.mozilla.org/docs/Web/CSS/zoom"
}
Expand Down
2 changes: 2 additions & 0 deletions css/properties.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"percentages": {
"enum": [
"blockSizeOfContainingBlock",
"convertedToNumber",
"dependsOnLayoutModel",
"inlineSizeOfContainingBlock",
"lengthsAsPercentages",
Expand Down Expand Up @@ -126,6 +127,7 @@
"asSpecified",
"asSpecifiedAppliesToEachProperty",
"asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
"asSpecifiedButWithPercentageConvertedToTheEquivalentNumber",
"asSpecifiedExceptMatchParent",
"asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
"asSpecifiedRelativeToAbsoluteLengths",
Expand Down
6 changes: 6 additions & 0 deletions l10n/css.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@
"ca": "com s'especifica, excepte que si {{cssxref(\"overflow-x\")}} o bé {{cssxref(\"overflow-y\")}} són diferents de <code>visible</code> o <code>clip</code>, aquests dos valors computen a <code>auto</code> o <code>hidden</code> respectivament",
"ja": "指定通り、ただし {{cssxref(\"overflow-x\")}} と {{cssxref(\"overflow-y\")}} のどちらかが <code>visible</code> でも </code>clip</code> でもない場合は、 <code>visible</code>/<code>clip</code> はそれぞれ <code>auto</code>/<code>hidden</code> と計算される"
},
"asSpecifiedButWithPercentageConvertedToTheEquivalentNumber": {
"en-US": "as specified, but with {{cssxref(\"&lt;percentage&gt;\")}} converted to the equivalent {{cssxref(\"&lt;number&gt;\")}}"
},
"asSpecifiedExceptMatchParent": {
"de": "wie angegeben, außer für den <code>match-parent</code> Wert, welcher in Bezug auf den <code>direction</code> Wert des Elternelements berechnet wird und einen berechneten Wert von <code>left</code> oder <code>right</code> ergibt",
"en-US": "as specified, except for the <code>match-parent</code> value which is calculated against its parent's <code>direction</code> value and results in a computed value of either <code>left</code> or <code>right</code>",
Expand Down Expand Up @@ -682,6 +685,9 @@
"ja": "連続メディア",
"ru": "продолжительный"
},
"convertedToNumber": {
"en-US": "Converted to {{cssxref(\"&lt;number&gt;\")}}"
},
"createsStackingContext": {
"de": "Erstellt <a href=\"/de/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context\">Stapelkontext</a>",
"en-US": "Creates <a href=\"/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context\">stacking context</a>",
Expand Down