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

I have another question about transitions that I think ought to be
addressed in the spec ( http://dev.w3.org/csswg/css3-transitions/ ),
though in this case I'm not exactly sure how it should be addressed
in the spec.

This is the question of whether transition should be associated with
a change in style on a content node, or a change in style on a
rendering object (a box).  Either solution poses a bunch of
problems.

If transitions are associated with the style on an element (DOM
node), then we have problems in any case where a content node has
more than one style.  The main case of this I can think of is
pseudo-elements.  For example, I think it's hard to do something
sensible with:
  p { color: gray; }
  p::first-line { color: black; }
  p:hover { color: blue; }
  p:hover::first-line { color: aqua; }
  a { transition: 3s color; }
then it's really not clear what the transition on the anchor should
be when the p goes into the :hover state (either when the anchor is
split between the first line and the second, or when the anchor is
entirely in the first line).

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.

I think the specification should define more precisely how
transitions interact with pseudo-elements and when they should occur
so that this distinction is clear.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Friday, 26 June 2009 23:44:50 UTC