W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: [css3-animations] display:none, visibility:hidden and animations

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 3 Oct 2011 13:10:18 -0700
Message-ID: <CAAWBYDAHm93HFoLWZLaiFk+v50RgiWpB51WatO0V=fEXxRr==Q@mail.gmail.com>
To: Brian Manthos <brianman@microsoft.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, Boris Zbarsky <bzbarsky@mit.edu>, Sylvain Galineau <sylvaing@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
On Mon, Oct 3, 2011 at 12:16 PM, Brian Manthos <brianman@microsoft.com> wrote:
> Tab:
>> Hmm, that's more subtle then.  I *would* still like animations to run
>> on display:none subtrees - the fact that we optimize subtrees away
>> here seems like it could surprise authors at times, because it's
>> detectable now.
>>
>> However, I'm much more concerned about animations on display:none
>> elements.  The justification for subtrees is understandable, but
>> stopping or pausing animations on display:none elements themselves is
>> just wrong.  There's no efficiency justification for it, and it'll
>> definitely be surprising when we gain the ability to animate
>> 'display'.
>
> http://www.w3.org/TR/CSS21/visuren.html#display-prop
> #9.2.4 The 'display' property
> #none
> #This value causes an element to not appear in the formatting structure
> #(i.e., in visual media the element generates no boxes and has no effect
> #on layout). Descendant elements do not generate any boxes either;
> # the element and its content are removed from the formatting structure
> #entirely. This behavior cannot be overridden by setting the 'display'
> #property on the descendants.
> #Please note that a display of 'none' does not create an invisible box;
> # it creates no box at all. CSS includes mechanisms that enable an element
> # to generate boxes in the formatting structure that affect formatting but
> # are not visible themselves. Please consult the section on visibility for details.
>
>
> So, Tab, you want an element that ...
> - does not appear in the formatting structure
> - generates no boxes
> - has no effect on layout
> - has its content removed from the formatting structure entirely
> - creates no box at all
>
> ... to react to animation properties?
>
>
> How and why?  It seems both "technically troubling" and "conceptually conflicting" with the the quoted "display:none" description.

They don't generate boxes, but they still have elements in the
element-tree, and they still receive properties.  If you ignore
performance optimizations, the only thing that display:none really
does is prevent you from doing "used values", since those are
layout-dependent.  However, transitions and animations operate over
computed values, so that's all right.

~TJ
Received on Monday, 3 October 2011 20:11:06 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:45 GMT