Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[css-grid] Grid implies that items are always resolved against a definite size #1319
In the last paragraph of section 11.1, Grid says:
This seems to imply that, at this point, the grid areas should be treated as having definite heights and widths, so that %s on grid items always resolve. Is this what we actually wanted?
Yes, after step 4 of section 11.1 grid area dimensions should be treated as definite.
One clarification we could add (I couldn't find) is that baseline alignment of grid items can also affect the row and column dimensions. For example an auto height row is defined by the max( maxHeightGridItem, maxAscentOfFirstBaselines + maxDescentOfLastBaselines) where maxAscentOfFirstBaselines is based of any two or more items participating in the row that have computed self-align: baseline or self-align: stretch(start) and content-align: first baseline; (similar for maxDescentOfLastBaselines).
I'm not too sure if the clarification above will be helpful for anyone other than implementers but it is an important one to get track resolutions correct.
I also agree that these clarifications may be way more interesting for implementors, but they indeed help to understand how the tracks are sized and how they acquired their actual size.
As a matter fact, my main doubt regarding this concept of "baseline affecting the intrinsic size" is that is somehow disconnected with the track sizing algorithm. There isn't any specification clarifying when it should be run.
The CSS Working Group just discussed
The full IRC log of that discussion<dauwhe> Topic: percentage children of stretch grid items
<astearns> github: https://github.com//issues/1319
<dauwhe> TabAtkins: flexbox has special text defining if your flex item is stretched and flex item is definite height specified
<dauwhe> ... grid doesn't have the same text, but some bits of it imply that
<dauwhe> ... so it would be useful to have it apply to grid
<dauwhe> ... easier 'cause it's sized according to tracks
<dauwhe> ... rossen said this should work
<dauwhe> ... for the same reason as flex
<dauwhe> ... 1320 is the same thing
<dauwhe> ... any opinions to the contrary?
<dauwhe> astearns: any objection?
<dauwhe> RESOLVED: copy from flexbox to grid: do what 1320 says :)
<dauwhe> RESOLVED: copy from flexbox to grid: do what 1319 says :)
<dauwhe> fantasai: axis names is an editorial thing