Re: [whatwg] (X)HTML + SMIL?

On Sun, Dec 28, 2008 at 10:06 AM, Bjoern Hoehrmann <derhoermi@gmx.net>wrote:

> You also can't look at "CSS Transitions" in isolation here, you have to
> consider style sheets as a whole, and if you compare
>
>  #example       { color: blue   }
>  #example:focus { color: orange }
>
> to
>
>  <set begin='0s' ... example ... color ... blue ...
>  <set begin='example.focusin' end='example.focusout' ... orange ...
>
> then it is quite easy to see that this is mere syntactic difference,
> and either both snippets "change property values", or neither does. It's
> only because writing much of your style sheet effectively in SMIL syntax
> is rather undesirable that "CSS Transitions" are being proposed.


Your example is missing the actual CSS transition rule, say
#example { transition: color 2s; }
That rule on its own does not cause anything to happen. Separating the
transition rule from the rules governing the actual change of values is
important, not just an accident of syntax. It means CSS Transitions allow a
clean separation between the setting of property values and the animation of
changing values, in a way that falls back nicely for UAs that don't support
transitions.

Also, moving style declarations from CSS into SMIL is much more than a
syntax change. SMIL doesn't have an equivalent of CSS selectors to apply a
single declaration to more than one element. Nor does it support flexible
association of style sheets with documents. Moving from declarative
pseudoclasses like ":focus" to notation based on event handlers would also
be a retrograde step.

I note by the way that the "CSS Transitions" still lacks a complete de-
> finition of exactly when a transition begins, and from which old state
> to which new state it should go, and what happens once it has reached
> it. For example, from the incomplete and informal suggestions it seems
> that changes trigger transitions, and transitions trigger changes; that
> process does not terminate by itself. Similarily other changes may occur
> while a transition is in progress, what happens then is not clear at all
> absent such definitions.
>

Indeed, the proposal is still incomplete.

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 Sunday, 28 December 2008 03:01:54 UTC