Consider simplifying -moz-linear-gradient parsing
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file)
As far as I can tell, we need -moz-* linear gradients for compat. But most of the weirdness of them is actually parsing the weird position syntax.
All of the regressions from bug 1337655 are compatible with standard gradients, so I want to make -moz-linear-gradient
just an alias for linear-gradient
.
Assignee | ||
Comment 1•6 years ago
|
||
All the regressions from the other un-shipping bugs are not an issue with this,
and this lets us massively simplify the gradient code, if it sticks.
Comment 2•6 years ago
•
|
||
All of the regressions from bug 1337655 are compatible with standard gradients, so I want to make -moz-linear-gradient just an alias for linear-gradient.
Maybe I'm misunderstanding, but I don't think this is correct... Per bug 1183994 comment 13, we found Zimbra using a gradient like "-moz-linear-gradient(top,#FFFFFF, #4AA6F1)", which is not valid as a standard gradient. IIRC standard syntax requires a to
keyword before the box-side keyword (top
) in order to make it valid.
As a quick example: the first of these works (and is effectively what Zimbra uses), and the second does not (with -moz removed to trigger standard-gradient parsing):
data:text/html,<div style="background:-moz-linear-gradient(top,teal,lime)">abc
data:text/html,<div style="background:linear-gradient(top,teal,lime)">abc
Assignee | ||
Comment 3•6 years ago
|
||
Yeah, I'm aware of it, and with this patch we do still render that correctly (I went through all those bugs, I promise!).
This patch roughly makes position parsing more webkit-like (webkit gradients do accept no to
keyword), though if we see a to
keyword we still "upgrade" it to a modern gradient, like -moz-
gradients actually do.
What I want to get rid of is basically the extremely complex position parsing that allows both angles and position.
Assignee | ||
Comment 4•6 years ago
|
||
Which reminds me I need to update the pref description in the patch.
Assignee | ||
Updated•6 years ago
|
Comment 6•6 years ago
|
||
bugherder |
Comment 7•6 years ago
|
||
I see you marked this as dev-doc-needed - what docs updates on MDN do you think this needs?
Assignee | ||
Comment 8•6 years ago
|
||
Wherever we describe the -moz-{linear, radial}
gradient syntax, it needs to be updated to reflect the new syntax, which is a mix of the standard and the webkit-like syntax.
If you point me to it I'm happy to take a stab at it. If we don't document the prefixed syntax then no changes are needed.
Comment 9•5 years ago
|
||
Posted site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2019/non-standard-complex-syntax-is-no-longer-supported-in-moz-prefixed-css-gradients/
Comment 10•5 years ago
|
||
We have no documentation for the prefixed versions of these (that is, -moz-linear-gradient
and such), so I don't believe we need to update documentation. This is, however, mentioned on Firefox 68 for developers.
Updated•5 years ago
|
Description
•