RE: [css-grid] row-gap/column-gap issues

> We've gotten a fair amount of feedback that authors would find Grid Layout
> easier to use and generally less confusing if we added row-gap and column-
> gap properties to automatically create gutters.
> 
>    * It makes track definitions easier to read and write, by eliminating
>      repetitive "noise".
>    * It makes repeat() significantly less awkward to use (since we don't
>      have the trailing-joiner problem).
>    * It handles gutters for implicit tracks, which is currently not possible.
>    * It eliminates the problem of auto-placement putting items into tracks
>      meant to provide gutters.
> 
> Happily the CSS Grid editors have been in agreement that we should do this,
> and as Simon Sapin once pointed out, there's even a CSSWG resolution on
> the books for this, that Tab and I keep not getting around to editing in:
>    https://lists.w3.org/Archives/Public/www-style/2013Dec/0121.html

> (We're always like, that's easy, we'll do it later. And then later never
> happens...)
> 
> So with some prompting from Rachel Andrews I finally did that today. :)
> 
> Except, as per usual, I ran into some issues.
> 
> http://dev.w3.org/csswg/css-grid-1/#gutters

> 
>    Issue 1: Should 'normal' (the initial value of 'row-gap') compute to '0'?
> 
>      I say yes, since this would be simpler for authors. Other opinions welcome.

Yep, makes sense.

>    Issue 2: Should we have a shorthand? What should it be called?
>             ('border-spacing' is unavailable because it inherits)

I second the need for it to start with grid (Rachel's suggestion), but would like it to be grid-track-gap, since grid-gap may make people initially think that it has to do with the overall gap of the outer grid, not necessarily the tracks as well. I may be overthinking this though.

>      Please go ahead and bikeshed this one...
>    Issue 3: Should the 'grid' shorthand reset the gap properties?
> 
>      I say yes, because we want shorthands to give a "blank slate" for related
>      properties, and resetting the grid should probably also reset the gutters.

Makes sense.

> Comments welcome~
> 
> ~fantasai

Received on Wednesday, 17 June 2015 04:50:18 UTC