W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: Apple's Proposal for CSS Animation

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 07 Nov 2007 23:14:00 +0100
To: "Anne van Kesteren" <annevk@opera.com>
Cc: www-style@w3.org
Message-ID: <b2a4j3du8fsqsek431e7ucmhbhegeb7bip@hive.bjoern.hoehrmann.de>

* Anne van Kesteren wrote:
>On Wed, 07 Nov 2007 15:23:29 -0500, Bjoern Hoehrmann <derhoermi@gmx.net>  
>> I am confused. Are you saying using markup is "inappropriate", or are
>> you saying embedding that markup in the document you are "styling" is
>> inappropriate? I would certainly disagree with the former, and either
>> way you are not answering my question (you could make a non-markup
>> syntax for SMIL, and you can put the SMIL code in separate documents,
>> using XInclude, XBL, some new markup language specifically for this
>> purpose, etc.)
>Isn't that a bit too complex for something simple like this?

(When I talk about SMIL below, I mean SMIL in some sense, not any par-
ticular way of encoding or embedding or referencing "SMIL".)

I do not think that the proposal is the least complex solution to what-
ever problem it attempts to solve (and the point of the question was to
find out what the precise problem is), and I didn't propose any specific
alternative and you did not offer a definition for complex and simple,
so I can't really answer that.

There are many things that are difficult or impossible to achieve with
the proposed CSS extensions but easy to implement using SMIL. I already
gave the example where you want to trigger an animation in response to
an event that does not have a CSS selector, in SMIL you could just say

  <animate begin='event' ...

With the CSS extensions you'd have to add event handler code, so that's
one thing that's more complex, perhaps "a bit too complex". Another ex-
ample would be if one element changes state and you want to animate the
properties of a different element in response (say, fade an element in-
to the background if you focus some other element), you'd have to use
scripting again, with SMIL you can just say

  <animate begin='focus' targetElement='otherElement' ...

And then you quickly run into cases where it's less clear whether your
animation is purely presentational. If you have, say, a pictures of the
day web page with preview thumbnails at the bottom and the current one
in the middle, and you want to enlarge the thumbnail while hovering and
load the image in the middle at the same time, if you use HTML you'd
use the CSS extensions for the hover effect and presumably scripting
to load the image in the middle, and if you use SVG you'd use the same
SMIL animation features for both, which I think is less complex.

You might also want to have different animations or transitions for
fading into a new state and fading out of it. With SMIL that's easy,
with the proposed CSS extensions that's an open issue with no obvious
solution; I take the "What should happen when a value is changed midway
through a transition?" to be this issue, i.e. you might have

  :link       { transition: ... }
  :link:hover { transition: ... }

which is what you'd seem to use if you want different effects. So the
proposal does not seem to score very high on the simplicity scale, but
it's not fair to judge the proposal without knowing what it is meant to
address in particular; it might be the perfect solution to the wrong
problem, in which case discussing solutions won't help much.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 7 November 2007 22:14:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:31 UTC