Closed Bug 1151201 Opened 10 years ago Closed 10 years ago

[css-grid] Update parsing of 'auto' in track-sizing functions to latest version of the spec.

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The Grid spec has changed <track-breadth>. This is the OLD spec: http://www.w3.org/TR/2014/WD-css-grid-1-20140513/#typedef-track-list Note that 'auto' is a value of <track-size> there, not <track-breadth>. And that 'auto' is defined as 'minmax(min-content, max-content)'. The latest spec has moved 'auto' from <track-size> to <track-breadth>: http://dev.w3.org/csswg/css-grid/#typedef-track-list which means it can now occur inside 'minmax()'. And 'auto' now means 'minmax(auto,auto)', IIUC. The CSSWG resolution is here: https://lists.w3.org/Archives/Public/www-style/2015Jan/0269.html (at line ~213) fantasai: Next is about minimum size of grid tracks. fantasai: In the Grid spec, if you have an auto or flex-sized track, you use the largest of the min-contents of the things in the track as the "minimum size" of the track, and then grow it or flex it from there. fantasai: This doesn't work well for items that have a specified minimum size. fantasai: We have a min-*:auto value from Flexbox. The idea is to have Grid behave the same way. fantasai: Default behavior would stay the same, due to "auto", but let people override. fantasai: This allows "auto" in minmax() - minmax(auto, foo) means "use the specified min-* property value", and that "auto" on its own expands to "minmax(auto, auto)". plinss: Seems fine, but it look like there's a few subtleties I haven't wrapped my head around. fantasai: I had Peter Salas look over the algorithm, and made some fixes. I think the algorithm ends up fine. plinss: Any implementors have any opinions? Rossen: We were part of the discussion, and were fine with it. RESOLVED: Allow "auto" in minmax(), have it look at min-width/height for value, using same "auto" behavior as flexbox
Attached patch fixSplinter Review
Attachment #8596390 - Flags: review?(simon.sapin)
Attachment #8596390 - Flags: review?(simon.sapin) → review+
Flags: in-testsuite+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: