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

On Fri, Jun 27, 2014 at 2:33 AM, François REMY
<francois.remy.dev@outlook.com> wrote:
> 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?

Yes, but check out the error-correction section:
<http://dev.w3.org/csswg/css-grid/#grid-placement-errors>.  When the
-end property would contribute a line at or before the line
contributed by -start, it instead contributes nothing.  So the whole
grid placement is just a column-start line at L1.  Follow the
placement => position/span rules at the beginning of the chapter, and
you get a span of 1, as that's the default when there's no span
contributed and it's not a subgrid.

~TJ

Received on Friday, 27 June 2014 17:51:00 UTC