New issue
Advanced search Search tips

Issue 618972 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 79180



Sign in to add a comment

[css-grid] Support fit-content as track breadth

Project Member Reported by r...@igalia.com, Jun 10 2016

Issue description


Again a recent change on the spec, introducing a new option to define the track breadths:
https://github.com/w3c/csswg-drafts/commit/3bc73f80

The syntax is:
  fit-content( [ <length> | <percentage> ] )

See: https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-fit-content

 

Comment 1 by r...@igalia.com, Jun 21 2016

Before working on this we should read carefully:
https://github.com/w3c/csswg-drafts/issues/209

Comment 2 by svil...@igalia.com, Aug 2 2016

Status: Assigned (was: Available)
Working on this

Comment 3 by r...@igalia.com, Aug 16 2016

Owner: svil...@igalia.com
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 31 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1993c05386140afe56921048784bf3ca449f4b63

commit 1993c05386140afe56921048784bf3ca449f4b63
Author: svillar <svillar@igalia.com>
Date: Wed Aug 31 17:40:15 2016

[css-grid] Implement fit-content track size

This CL implements the new <fit-content> track size which is defined as
follows: "Represents the formula min(max-content, max(auto, argument)),
which is calculated similar to auto (i.e. minmax(auto, max-content)), except
that the track size is clamped at argument if it is greater than the auto
minimum."

From the parsing POV fit-content was implemented as a new type of function
which only takes one argument. That forced us to refactor some code because
minmax() was the only allowed function for <track-size>s so far.

The implementation key is a new attribute in GridTrack called growthLimitCap
which is precisely the attribute of fit-content(). Some parts of the track sizing
algorithm were adapted to this change like for example the sorting of tracks by
growth potential (we need to consider the caps).

BUG= 618972 

Review-Url: https://codereview.chromium.org/2287113004
Cr-Commit-Position: refs/heads/master@{#415676}

[add] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html
[add] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns.html
[add] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-rows-expected.html
[add] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-rows.html
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set.html
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/layout/LayoutGrid.h
[modify] https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63/third_party/WebKit/Source/core/style/GridTrackSize.h

Comment 5 by svil...@igalia.com, Sep 1 2016

Status: Fixed (was: Started)

Sign in to add a comment