"background-size:0px" serializes as "0px auto" in getComputedStyle (causing WPT failure in background-size-001.html )
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: dholbert, Assigned: boris)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
STR:
- Load data:text/html,<div style="background-size: 0px">InspectMe</div>
- Using devtools, inspect the computed style of that div.
EXPECTED RESULTS:
Computed "background-size" should be "0px"
ACTUAL RESULTS:
Computed "background-size" is shown as "0px auto"
Properties are typically supposed to be serialized as their most concise expression, which in this case would be "0px" (which happens to be the specified value in this case).
This is the reason we fail https://wpt.fyi/results/css/css-backgrounds/background-size-001.html as noted in bug 1514243.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Just as extra justification/explanation here -- per https://www.w3.org/TR/css-backgrounds-3/#typedef-bg-size :
"If only one value is given the second is assumed to be auto."
So the "auto" at the end of the serialization here is unnecessary (i.e. it's implied/superfluous)
Reporter | ||
Comment 2•5 years ago
|
||
Hopefully the fix here can remove the .ini failure-annotation file here:
https://searchfox.org/mozilla-central/source/testing/web-platform/meta/css/css-backgrounds/background-size-001.html.ini
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
I think we should always omit the 2nd value if it is auto
: https://github.com/w3c/csswg-drafts/issues/2574
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Boris Chiou [:boris] from comment #4)
I think we should always omit the 2nd value if it is
auto
: https://github.com/w3c/csswg-drafts/issues/2574
This means we probably need to update wpt, and it looks like both Blink and WebKit follow this rule (https://wpt.fyi/css/css-backgrounds/background-size-001.html).
Comment 7•5 years ago
|
||
bugherder |
Description
•