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

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 30 Jun 2009 09:25:24 +1200
Message-ID: <11e306600906291425r7a806428h7bb5ab7a779e551d@mail.gmail.com>
To: David Hyatt <hyatt@apple.com>
Cc: "L. David Baron" <dbaron@dbaron.org>, www-style@w3.org
On Tue, Jun 30, 2009 at 2:20 AM, David Hyatt <hyatt@apple.com> wrote:

> On Jun 28, 2009, at 10:57 PM, Robert O'Callahan wrote:
>
> On Sun, Jun 28, 2009 at 9:37 AM, David Hyatt <hyatt@apple.com> wrote:
>
>> In WebKit, at the moment we do transitions on rendering objects (and yes
>> this means changes to display:none just kill transitions).  We don't allow
>> transitions to occur on pseudo elements.  Not sure if this is the right
>> decision though, but it's what we have done so far.
>>
>
> What if you have a <span> which fits on one line, a transition on 'color'
> starts, but halfway through the container width changes so the <span> breaks
> across two lines? The second box gets the final color immediately? If this
> happened because the user resized the window, I think it's clearly a bug.
>
>
> Unlike Gecko, our "rendering objects" are not affected by changes in line
> structure.  We create separate objects for lines.  So what you describe is
> not an issue in WebKit.
>
>
It's better to think of transitions as happening on nodes and on pseudo
> elements, since obviously the notion of a "rendering object" isn't the same
> in every engine.
>

Defining transitions on 'first-line' have nearly the same set of issues as
defining transitions in terms of boxes. ('before' and 'after' are obviously
easy since they can be considered to create anonymous elements of their
own.)

So here's another version of my question:
p { color:gray; }
p::first-line { color:black; }
a:hover { color:red; transition:3s color; }
Suppose initially an <a> fits on the first line its parent <p>, then it gets
hovered, and halfway through the transition <p>'s width changes so the <a>
wraps to the next line. What should happen to the second line of <a>? Should
it start a new transition from gray to red? Would the answers be different
if the pseudo-element rule was p::first-line { letter-spacing:1px; } ?

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
Received on Monday, 29 June 2009 21:26:04 GMT

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