Improve serialization of conic and radial gradients
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | verified |
People
(Reporter: sebo, Assigned: ntim)
References
Details
Attachments
(1 file)
According to https://drafts.csswg.org/cssom-1/#serializing-css-values, the serialization of values should always be as short as possible (without changing the meaning of the value).
Currently, the computed value of a conic-gradient()
value always includes the at <position>
value, even when it's the default value.
Examples:
conic-gradient(lime, blue)
=>conic-gradient(at 50% 50%, rgb(0, 255, 0), rgb(0, 0, 255))
conic-gradient(at center, lime, blue)
=>conic-gradient(at 50% 50%, rgb(0, 255, 0), rgb(0, 0, 255))
conic-gradient(at 50% 50%, lime, blue)
=>conic-gradient(at 50% 50%, rgb(0, 255, 0), rgb(0, 0, 255))
conic-gradient(from 0deg, lime, blue)
=>conic-gradient(at 50% 50%, rgb(0, 255, 0), rgb(0, 0, 255))
In all those cases the at 50% 50%
should be removed from the serialized value (like it's done for the from <angle>
value).
Sebastian
Comment 1•5 years ago
|
||
This is also an issue for radial gradients, for what is worth.
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
This is also an issue for radial gradients, for what is worth.
I've extended this bug to also cover radial gradients. Feel free to reduce its scope to conic gradients again if you think they should be treated separately.
Sebastian
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Backed out changeset 507a811671f8 (bug 1618997) for causing bustages
https://hg.mozilla.org/integration/autoland/rev/4cfcc575d205b076fc006b22eea8ce226abd359f
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=295119556&resultStatus=busted%2Crunnable&revision=507a811671f8a9f3a983bfc453f3f7500277efb4
Assignee | ||
Updated•5 years ago
|
Comment 9•5 years ago
|
||
Backed out changeset 9bbf5c41c5ce (bug 1618997) for causing for causing mochitest and wpt failures
https://hg.mozilla.org/integration/autoland/rev/1849b9eb805a8bd8a59221f53cbadd6a1be41280
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=295131166&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=9bbf5c41c5ce4ddbf35c6c2a53f4dc7353c916de&failure_classification_id=2
Comment 10•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
bugherder |
Reporter | ||
Comment 14•5 years ago
|
||
Tested it with Nightly 76.0a1 2020-03-29 on Windows 10 and it works now as expected.
Thank you for fixing this, Tim!
Sebastian
Description
•