LibWeb/CSS: Correct "percentages-resolve-to" data for properties

These were missing for properties that take a `<position>`, and were
incorrectly present for opacity-related properties.
This commit is contained in:
Sam Atkins 2025-01-31 11:46:18 +00:00 committed by Alexander Kalenik
parent d15e1eb9f6
commit 6ebe19d13b
Notes: github-actions[bot] 2025-01-31 13:25:41 +00:00
2 changed files with 11 additions and 9 deletions

View file

@ -383,7 +383,8 @@
"longhands": [
"background-position-x",
"background-position-y"
]
],
"percentages-resolve-to": "length"
},
"background-position-x": {
"affects-layout": false,
@ -613,7 +614,8 @@
"border-top-right-radius",
"border-bottom-left-radius",
"border-bottom-right-radius"
]
],
"percentages-resolve-to": "length"
},
"border-right": {
"inherited": false,
@ -1083,8 +1085,7 @@
"valid-types": [
"number [-∞,∞]",
"percentage [-∞,∞]"
],
"percentages-resolve-to": "number"
]
},
"fill-rule": {
"affects-layout": false,
@ -2130,7 +2131,8 @@
"initial": "50% 50%",
"valid-types": [
"position"
]
],
"percentages-resolve-to": "length"
},
"opacity": {
"animation-type": "by-computed-value",
@ -2142,7 +2144,7 @@
"number [-∞,∞]",
"percentage [-∞,∞]"
],
"percentages-resolve-to": "number"
"__comment": "We don't have a percentages-resolve-to here because even though we're supposed to map percentages to [0,1], calc(10%) should resolve to 10% not 0.1."
},
"order": {
"animation-type": "by-computed-value",
@ -2530,7 +2532,7 @@
"number [-∞,∞]",
"percentage [-∞,∞]"
],
"percentages-resolve-to": "number"
"__comment": "We don't have a percentages-resolve-to here for the same reason as for opacity."
},
"stroke": {
"affects-layout": false,
@ -2595,7 +2597,7 @@
"number [-∞,∞]",
"percentage [-∞,∞]"
],
"percentages-resolve-to": "number"
"__comment": "We don't have a percentages-resolve-to here for the same reason as for opacity."
},
"stroke-width": {
"affects-layout": false,

View file

@ -139,7 +139,7 @@ ry: 'calc(2% * var(--n))' -> 'calc(2% * 2)'
stop-opacity: 'calc(2)' -> '2'
stop-opacity: 'calc(2 * var(--n))' -> '4'
stroke-opacity: 'calc(2%)' -> '2%'
stroke-opacity: 'calc(2% * var(--n))' -> 'calc(2% * 2)'
stroke-opacity: 'calc(2% * var(--n))' -> '4%'
stroke-width: 'calc(2px)' -> '2px'
stroke-width: 'calc(2px * var(--n))' -> '4px'
tab-size: 'calc(2px)' -> '2px'