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

Re: [css3-transitions] transitions and rendering objects vs. DOM nodes

From: L. David Baron <dbaron@dbaron.org>
Date: Sat, 27 Jun 2009 08:06:51 -0700
To: Giovanni Campagna <scampa.giovanni@gmail.com>
Cc: www-style@w3.org
Message-ID: <20090627150651.GA2778@pickering.dbaron.org>
On Saturday 2009-06-27 16:25 +0200, Giovanni Campagna wrote:
> First of all, "transition" does not apply to pseudo-elements, at least
> currently. So only boxes that are directly connected to DOM elements
> can have their properties transitioned.

That's not relevant; my cases describe issues where it applies to
things inside of pseudo-elements.

> This is not a css3-transition issue, but rather a css2 issue, namely:
> what is the Computed Value for color for "a"?
> In fact, a lot of places in css2 and css3 modules assumes a mapping
> like (element, property) => (computed value), which is generally true,
> as long as you don't use line level pseudo-elements (currently only
> ::first-line, in the future, who knows?)
> Other pseudo-elements also cause similar problems (in particular
> ::selection and ::first-letter), although they're either unspecified
> or undefined when problematic.
> 
> This means that neither css3-selectors nor css2 can advance to cr / pr
> without resolving this issue. I guess the best place to solve it would
> be css3-cascade, since it involves finding inherited and specified
> values for splitted elements.

If you think there are problems with the concept of "Computed Value"
in those drafts, please raise them in a *separate* thread (and
explain why they are problems).

> > On the other hand, if transitions are associated with the style on a
> > rendering object, you end up with transitions not occurring when
> > there's also a change in 'display' or some other property that
> > changes what rendering objects are present.
> 
> Do you mean like
> p {
> color:red;
> transition: 3s color;
> display:block;
> 
> p:active {
> display:none;
> color:blue;
> }
> 
> In this case, the transition of color is not needed. Problems can
> arise if display goes to block again while the transition should be in
> progress.

But people might want a transition when changing from 'display:none'
to some other value.  For example, they might simultaneously change
'width' and want 'width' to transition.

They might also want to transition 'width' at the same time as
changing a value of 'overflow' (which is like display, at least in
our implementation, though that could be implementation-specific,
which is a reason it's bad for behavior to depend on it).

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Saturday, 27 June 2009 15:07:29 GMT

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