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

Re: [css-grid] resolved value of grid-template-rows / grid-template-columns, in "display:none" subtree?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 26 Feb 2014 13:27:03 -0800
Message-ID: <CAAWBYDDpxp0wAXHbRMe82fnjUjHH=PsAQCFGEaLz6c3-Goq8NQ@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style <www-style@w3.org>
On Tue, Feb 25, 2014 at 4:19 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
> The http://dev.w3.org/csswg/css-grid/#resolved-track-list currently says:
>
>  # The resolved value of the grid-template-rows
>  # and grid-template-columns properties is the
>  # used value, serialized as follows:
>  # [...]
>  #  * Every track size given as a length in
>  # pixels, regardless of sizing function.
>
> This doesn't account for the possibility that we might be in a
> "display:none" subtree, however (which would mean we wouldn't have
> layout information, and wouldn't be able to convert arbitrary sizing
> functions into pixels).
>
> The CSSOM spec explicitly mentions this possibility when defining the
> resolved value of standard length-based properties (e.g. height and
> width), and it says we should fall back on the computed value (instead
> of converting to pixels) in display:none content:
>
>  # If the property applies to the element or pseudo-element and
>  # the resolved value of the 'display' property is not 'none',
>  # the resolved value is the used value. Otherwise the resolved
>  # value is the computed value.
> http://dev.w3.org/csswg/cssom/#resolved-values
>
> Presumably we need the same sort of exception here for the resolved
> value of grid-template-rows & grid-template-columns, right?

Good point.  Yes, we need to copy the exception over.

> P.S. (I think the CSSOM really wants the exception to apply *when the
> element is in a display:none subtree* -- not just when the element's own
> "display" value is "none".)

Actually, it wants the exception to apply any time the element doesn't
generate a box.  There are more things that can suppress that than
just display:none; for example, it should apply to a "display-box:
contents;" element, or to a ::before with "content: none;".

~TJ
Received on Wednesday, 26 February 2014 21:27:50 UTC

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