Re: [css3-gridalign] Named gridlines

On Nov 2, 2010, at 4:33 AM, Tab Atkins Jr. wrote:

> On Tue, Nov 2, 2010 at 2:44 AM, François REMY <fremycompany_pub@yahoo.fr> wrote:
>> For elements spanning only one cell, would it be possible to define {
>> grid-position: 'myRow' 'myColumn'; } instead of a 4-elements syntax ?
>> 
>> It would be equivalent to {
>>   grid-position-top: 'myRow';
>>   grid-position-bottom: 'myRow';
>>   grid-position-left: 'myColumn';
>>   grid-position-right: 'myColumn';
>> }
> 
> Yes, that would be perfectly fine.  If one of the gridlines isn't
> defined, it should be the immediate next/prev gridline.  For example,
> saying "grid-position-top: 'myRow'; grid-position-left: 'myColumn';",
> and don't define the right or bottom, then the item is only one row
> tall and one column wide.

Note that in this proposal you're addressing grid lines, not grid cells. So while { grid-position: 'myRow' 'myColumn'; } would be fine, it would be equivalent to:
{ grid-position-top: 'myRow';
  grid-position-left: 'myColumn'; }
and the you're presuming the lack of a specification for the opposite edge defines a span to the next grid line.

Which also implies that:
{ grid-position-right: 'myRow';
  grid-position-bottom: 'myColumn'; }
is also OK, and the grid cell would be the one to the left and above the named grid lines (which seems useful).

Your equivalence defines a grid cell with 0 width and height (which we could consider an error and the recovery is to make it one cell wide and/or high as needed).

Peter

Received on Tuesday, 2 November 2010 13:45:55 UTC