RE: [css-grid] improving the grid shorthand

> >> https://drafts.csswg.org/css-grid-1/issues-wd-20150917#issue-41
> >>
> >> Eric pointed out earlier that 'grid' being able to set either
> >> template values OR auto-flow values is quite limiting:
> >>    https://lists.w3.org/Archives/Public/www-style/2016Mar/0345.html
> >>    https://lists.w3.org/Archives/Public/www-style/2016Apr/0093.html
> >>
> >> In particular, when one wants to set up an auto-flow grid, one of the
> >> dimensions is *not* auto-flow, and therefore needs to set up an
> >> explicit template. For example, you'll set up your columns and
> >> auto-fill into rows. But the grid shorthand right now does not allow
> >> this, even though this is the primary usage pattern of auto-flow grids.
> >>
> >> To fix this, we'd like to change the syntax of 'grid' to remove the
> >> current grid- auto branch
> >>    <‘grid-auto-flow’> [ <‘grid-auto-rows’> [ / <‘grid-auto-columns’> ]? ]?
> >> which isn't particularly useful, and instead extend the branch that
> >> sets grid- template-rows / grid-template-columns
> >>    <‘grid-template-rows’> / <‘grid-template-columns’> to also be able
> >> to specify auto-flow values.
> >>
> >> Our current idea for this is
> >>    <grid-template-rows>  / [ auto-flow && dense? ] <grid-auto-columns>? |
> >>    [ auto-flow && dense? ] <grid-auto-columns>?  /
> >> <grid-template-columns> which merely extends the syntax for rows or
> >> columns in the shorthand to be either a track listing or an auto-flow setup.
> >
> > I guess you meant:
> >     <grid-template-rows> / <grid-template-columns> |
> >     <grid-template-rows>  / [ auto-flow && dense? ] <grid-auto-columns>? |
> >     [ auto-flow && dense? ] <grid-auto-rows>?  /
> > <grid-template-columns>
> >
> > Correct?
> >
> > If yes, I think it makes sense.
> 
> No, we were explicitly replacing the existing grid-auto branch (see the
> sentence starting with "To fix this").  So yes, the existing "explicit rows/cols"
> and "ascii layout" branches stay.

"No... so yes"? You confused me here... I think we are on the same page but would like to be sure. Let's see if what I understood make sense:

Under this proposal, you would be able to set grid to either:
- one 2D template (ascii),
- two 1D templates, or
- one 1D template and one auto-track definition (in either order)

The other thing I fixed in the email was 
----> [ auto-flow && dense? ] <grid-auto-columns>? / <grid-template-columns>
----> (fixed into auto rows, and columns)

I believe this fix is what you intended.

------------------------------------

Another thing, could we remove the "-template" part again, now that we removed "grid-template"? I would rather type "grid-rows: XXXX" than "grid-template-rows: XXXX" and now the "-template" part seems unnecessary.

Received on Thursday, 14 April 2016 23:35:53 UTC