You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-typed-om] Serialization of 2D CSSScale should never skip the second value #1161
@emilio It looks like Firefox is the only one doing so. I've expanded on my test case a bit:
Revised test case
<!DOCTYPE html><style>#a{transform:scale(1.5);}#b{transform:scale(1.5,1.5);}</style><divid="a"></div><divid="b"></div><script>try{console.log('computedStyleMap, one value:',a.computedStyleMap().get("transform").toString());console.log('computedStyleMap, two values:',b.computedStyleMap().get("transform").toString());}catch(e){console.log('computedStyleMap() unavailable');}constdivElm=document.createElement('div');divElm.style.transform='scale(1.5)';console.log('style, one value:',divElm.style.transform);divElm.style.transform='scale(1.5, 1.5)';console.log('style, two values:',divElm.style.transform);</script>
Firefox 144.0.2
Chrome 142.0.7444.176
Safari 18.6
Ladybird 8348c55570d
computedStyleMap, 1 value
N/A
scale(1.5, 1.5)
scale(1.5, 1.5)
scale(1.5, 1.5)
computedStyleMap, 2 values
N/A
scale(1.5, 1.5)
scale(1.5, 1.5)
scale(1.5, 1.5)
style, 1 value
scale(1.5)
scale(1.5)
scale(1.5)
scale(1.5)
style, 2 values
scale(1.5)
scale(1.5, 1.5)
scale(1.5, 1.5)
scale(1.5, 1.5)
The reason I'm reporting this is since I saw Chrome and Safari behaving the same, and the css/css-transforms/animation/transform-interpolation-computed-value.html WPT test also expects two values, not one.
If you're convinced this is an issue with Chrome and Safari, I could also send in a PR to WPT?
Activity
emilio commentedon Nov 19, 2025
That seems wrong tho?
scale(1.5)is the shortest serialization. Chrome and WebKit also serialize with one argument if you serialize specified styles:Though I don't think they omit the second argument if equal to the first (they should tho, and Firefox does it):
gmta commentedon Nov 19, 2025
@emilio It looks like Firefox is the only one doing so. I've expanded on my test case a bit:
Revised test case
144.0.2
142.0.7444.176
18.6
8348c55570d
scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5)scale(1.5)scale(1.5)scale(1.5)scale(1.5)scale(1.5, 1.5)scale(1.5, 1.5)scale(1.5, 1.5)The reason I'm reporting this is since I saw Chrome and Safari behaving the same, and the
css/css-transforms/animation/transform-interpolation-computed-value.htmlWPT test also expects two values, not one.If you're convinced this is an issue with Chrome and Safari, I could also send in a PR to WPT?
emilio commentedon Nov 19, 2025
I think in principle this is a Chrome / WebKit bug. cc @janvarga