Re: [css-grid] improving the grid shorthand

On 14 Apr 2016, at 14:08, fantasai wrote:

> 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.
>
> For example,
>   grid: auto-flow 10em / repeat(auto-fill, 30em);
> sets up a grid that
>   * fills the inline axis with as many 30em columns as will fit
>   * auto-flows into rows 10em tall

Unless I've drastically misunderstood, I see the same basic problems as 
before-- that you can address one set of properties at a time, but not 
all properties the shorthand can represent at once, so you end up 
force-defaulting the ones you can't address.

This is like defining 'font' to either let authors set a size and 
family, OR set the weight, style, and variant, but never both at once; 
and so, if you declare 'font: bold', then the size and family are reset 
to browser defaults.  (Yes, 'font' has its own oddities, but at least 
not THAT oddity.)

I also would want to remove the resetting of grid gaps via 'grid', since 
gaps can't be defined with the shorthand at all.  Having a shorthand 
reset properties it can't itself define seems deeply squamous, if not 
rugose.


--
Eric A. Meyer - http://meyerweb.com/

Received on Wednesday, 20 April 2016 18:07:23 UTC