Open Bug 1234357 Opened 9 years ago Updated 2 years ago

Process 0 as 0deg in CSS angular properties (e.g., gradients, transforms syntax)

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

Tracking Status
firefox46 --- affected

People

(Reporter: bugs, Unassigned)

References

()

Details

(Keywords: compat, dev-doc-needed, Whiteboard: [stylo])

Attachments

(1 file)

Chrome, Edge, and Safari process 0 as 0deg in CSS gradients. Although this is invalid per this CSS spec, the other major browser engines interoperate: http://www.w3.org/TR/css3-values/#lengths I filed a Chromium bug to track the issue: https://code.google.com/p/chromium/issues/detail?id=569703
Updated bug title to reflect CSSWG resolution from 2/1/2016 F2F meeting.
Summary: Process 0 as 0deg in CSS gradient syntax → Process 0 as 0deg in CSS angular properties (e.g., gradients, transforms syntax)
We have tests for the old behavior, while Servo's style system has the new behavior, so make it block stylo-style-mochitest.
Whiteboard: [stylo]
Comment on attachment 8853912 [details] Bug 1234357: Process 0 as 0deg in CSS angular properties. https://reviewboard.mozilla.org/r/125934/#review128468 ::: layout/style/test/property_database.js:188 (Diff revision 1) > + "-moz-linear-gradient(top left 0, red, blue)", > + "-moz-linear-gradient(5px 5px 0, red, blue)", Is it that a unitless zero angle is allows in a -moz-prefixed gradient only if we've already parsed the position? Is that the current behaviour, or do we disallow unitless angles anywhere in legacy gradient syntax?
Comment on attachment 8853912 [details] Bug 1234357: Process 0 as 0deg in CSS angular properties. https://reviewboard.mozilla.org/r/125934/#review128468 > Is it that a unitless zero angle is allows in a -moz-prefixed gradient only if we've already parsed the position? Is that the current behaviour, or do we disallow unitless angles anywhere in legacy gradient syntax? Right, we disallow it at the first position (where it'd be ambiguous). Otherwise I've just kept VARIANT_ANGLE, which now allows unitless angles. Happy to tweak it as you see fit.
Perhaps worth waiting until https://github.com/w3c/csswg-drafts/issues/1162 gets resolved.
Priority: -- → P3
OK, holding off for now. Please re-request review once the issue is discussed in the WG.
Attachment #8853912 - Flags: review?(cam)
RESOLVED: Only spec the unitless 0 quirk for transforms & gradients Spec changes: https://github.com/w3c/csswg-drafts/commit/602789171429b2231223ab1e5acf8f7f11652eb3
Depends on: 1363292
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: