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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 27 Jun 2014 10:50:13 -0700
Message-ID: <CAAWBYDC4wgmiyPd5qQ+_wDh8Ki4Z-S=Z9h7n81NevyecCH+7mA@mail.gmail.com>
To: Fran├žois REMY <francois.remy.dev@outlook.com>
Cc: CSS WG <www-style@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:43 UTC