W3C home > Mailing lists > Public > www-style@w3.org > June 2014

[css-grid] Named lines & grid-row/column shorthands

From: François REMY <francois.remy.dev@outlook.com>
Date: Fri, 27 Jun 2014 11:33:07 +0200
Message-ID: <DUB130-DS208BD3D0EDCDA5BE03ECE4A51B0@phx.gbl>
To: "CSS WG" <www-style@w3.org>
While the answer to this question is likely to be in the spec, I would like 
to double-check what the following example does:

    #GRID { grid-template-columns: (L0) auto (L1) auto (L2) auto (L3); ... }
    #GRID > ELM { grid-column: L1; ... }

Here's my current interpretation:

    Given there's no second value for "grid-column", and given the first 
value is an IDENT, both "grid-column-start" and "grid-column-end" are 
computed to "L1".
    Given there's no area named L1, we can skip the L1-start/L1-end check.
    In conclusion, the element ends up with both start and end edges being 
attached to the L1 line, and a span of 0.

First, am I correct in my interpretation?

Second, is it really what was intended? Usually, the implied value for 
"grid-column/row" is a span of 1, and the custom ident exception seems to be 
targeted at grid-area snapping (auto increase of the span to match the area) 
and not the case where a line is matched instead. An alternative I've in 
mind would be to specify that "auto" is always used when the second value is 
omitted, but that "grid-r/c-end: auto" computes to the same value as 
"grid-r/c-start" if the current element is not a subgrid and that there's a 
grid area named after "grid-r/c.-start".

Thoughts? 
Received on Friday, 27 June 2014 09:33:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC