[css-grid] grid-template removal

Now that I've worked with some grid experiments since 'grid-template' 
was dropped, I've found a reason why dropping it might be undesirable.  
It's not an absolute blocker or anything, but it does bug me a bit.

In the past, I might've written something like this:

     .galleries {display: grid;
         grid-flow: dense column;
         grid-auto-rows: 100px;
         grid-auto-columns: 100px;
         grid-gap: 10px 15px;
     }
     #gallery01 {
         grid-template: 2em 1fr 3em / 1fr repeat(4,2fr) 1fr;}
     #gallery02 {
         grid-template: 2em 1fr 1fr 1em / 1fr repeat(5,2fr) 1fr;}


Now that 'grid-template' is gone, I might convert that to:


     .galleries {display: grid;
         grid-flow: dense column;
         grid-auto-rows: 100px;
         grid-auto-columns: 100px;
         grid-gap: 10px 15px;
     }
     #gallery01 {
         grid: 2em 1fr 3em / 1fr repeat(4,2fr) 1fr;}
     #gallery02 {
         grid: 2em 1fr 1fr 3em / 1fr repeat(5,2fr) 1fr;}

…except the 'grid' shorthands will reset everything I declared under 
'.galleries', due to the shorthand behavior and specificity.  So I end 
up in a specificity arms race with myself that I didn't have to get into 
before.

Of course, I could even now use 'grid-template-rows' and 
'grid-template-columns' in place of 'grid', and obviously will do.  
Perhaps my problem is really that 'grid' is currently limited to set a 
template OR set flow and auto-tracks (but not gutters, even though 
they're reset too).  This dramatically limits the circumstances in which 
it can be used.

Either way, I wanted to contribute my observations.


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

Received on Wednesday, 23 March 2016 16:46:04 UTC