Closed
Bug 1331530
Opened 8 years ago
Closed 7 years ago
stylo: value of flex-basis should be set to 0% if it is omitted in flex shorthand
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox53 | --- | affected |
People
(Reporter: xidorn, Unassigned)
References
Details
(Whiteboard: [stylo])
It seems to me the CSS Flexible Box spec says, if the part of flex-basis is omitted in a declaration of flex shorthand, the specified value of flex-basis should be "0". And given flex-basis accepts "0" as a <width> value, I believe it means "0px" rather than "0%" here (although they are effectively the same for layout, they are different from CSSOM.)
Reporter | ||
Comment 1•8 years ago
|
||
I didn't test the code, but from the expected behavior of layout/style/test/test_flexbox_flex_shorthand.html test, I suppose the current behavior doesn't match the spec.
Comment 2•8 years ago
|
||
I recall the spec requiring 0% (with the percent) at some point. If it doesn't now, then there was likely a spec change.
Blocks: flexbox-spec-changes
Reporter | ||
Updated•8 years ago
|
Blocks: stylo-style-mochitest
Whiteboard: [stylo]
Updated•8 years ago
|
Keywords: dev-doc-needed
Reporter | ||
Comment 3•7 years ago
|
||
I guess you're right that the spec at least required 0% at some point, because all browsers I test so far (Firefox, Chrome, Edge) all agree with that behavior.
Reporter | ||
Comment 4•7 years ago
|
||
Reporter | ||
Comment 5•7 years ago
|
||
From the discussion mentioned in the commit, it seems to me changing from 0% to 0px may actually affect the layout. And given that all browsers currently agree with setting it to 0%, I don't think we should risk changing the behavior. So we should just make stylo align with other browsers.
Summary: Value of flex-basis should be set to 0px if it is omitted in flex shorthand → stylo: value of flex-basis should be set to 0% if it is omitted in flex shorthand
Reporter | ||
Updated•7 years ago
|
Keywords: dev-doc-needed
Reporter | ||
Comment 6•7 years ago
|
||
Submitted servo/servo#17073 for making Servo align with browsers.
Reporter | ||
Comment 7•7 years ago
|
||
Landed in
https://hg.mozilla.org/integration/autoland/rev/19bb59dbbfc1
https://hg.mozilla.org/integration/autoland/rev/4b4e9dbc0259
Marking as FIXED.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•7 years ago
|
No longer blocks: flexbox-spec-changes
You need to log in
before you can comment on or make changes to this bug.
Description
•