- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Thu, 3 Dec 2015 18:57:46 -0500
- To: www-style@w3.org
On 09/30/2015 02:27 PM, Sergio Villar Senin wrote: > Sorry for the long emails :) > > On 29/09/15 17:23, fantasai wrote: >> >> I think it would make more sense in this case for the available space >> to be 20px, not infinite, so I would say that the grid itself is also >> 20px tall. > > The problem is that there are so many potential combinations of min|max > functions, grid container's measurements and restrictions that it's > quite difficult to know as an implementor (and I guess as an author) how > the grid should behave. > >> That said, we should probably clarify this in the spec, and also >> specify explicitly how percentages behave one way or another--since >> the rules for height and width do not apply to grid-template-rows/cols >> unless we says so, and it should be stated whether the rules are the >> same or different than width/height so there is no confusion. > > Well I am not specially concerned about percentages (I was just using > them for the sake of my argumentation). The critical thing from my > understanding, is to perfectly specify what is the available size and > how to compute it, because as you know, the algorithm has 2 very > different paths for definite and indefinite sizes. There are many > different examples where I am not sure what to do, like > > - <div style="height: 60px;"><div style="display:grid;"></div></div> > - <div style="max-height: 60px;"><div style="display:grid;"></div></div> > - <div style="display:grid; max-height: 60px;"></div> > > Strictly following the definition all those grids have indefinite > heights, but as you said it looks like "common sense" dictates that they > should behave differently sometimes. In the first two cases, the height on the outer div has no effect on the grid's layout. (If you added a percentage height on the grid, then it would affect the first case.) In the third case, the max-height should limit the growth of the grid tracks in the grid. > As this is the last design WD, I think everything about available and > free spaces is so critical to the algorithm that we must state very > clearly how they should behave and also the interactions with > min|max-content restrictions and min|max-height|width because there are > a lot of potential combinations that are not totally clear to me. We made some clarifications to the grid spec on this issue: https://hg.csswg.org/drafts/diff/dc4077bff17a/css-grid/Overview.bs Let us know if there are any remaining issues or concerns! ~fantasai
Received on Thursday, 3 December 2015 23:58:17 UTC