Re: CSS SVG Discussion on Thursday

On 03/11/2010, at 6:20 AM, Robert O'Callahan wrote:

> On Wed, Nov 3, 2010 at 7:54 AM, Dean Jackson <dino@apple.com> wrote:
> Some of the complaints against SMIL/SVG animation is that it mixes the animation with the content, but that doesn't need to be so. It would be fairly simply to define behaviour of an "animation sheet", referenced by a <link> element, that is an external file containing the animations. I'd suggest adding a selector attribute to the animation elements to replace xlink:href.
> 
> Maybe CSS animation is more appropriate for those use-cases?
> 
> - add a selector attribute to SMIL (possibly deprecating xlink:href) that would allow SMIL animations to apply to a collection of elements
> 
> I instinctively dislike the idea of selectors in content :-). If the author really wants selectors, isn't that likely to be a use-case favouring CSS animations?

Yes and no. I see CSS selectors as a separate technology from CSS - almost like a regexp for gathering DOM elements :) Just because you want a selector doesn't mean you have to be in CSS. Here I was mostly thinking of external SVGA-sheets.

But I do agree with your point, that this is approaching the point where it might be better to use CSS Animations. However, due to the original points I raised, there are many cases where you simply can't use CSS Animations (as currently specified and implemented).

> If we need to support a single content animation applying to multiple elements, we could add an SVG Animation (hereafter SVGA) feature to let elements link to their animations as well as the current situation where animations link to their elements. How does that sound?

Sure, sounds good. I'm not that concerned with the how, just with the idea that you shouldn't have to replicate an animation for every element you want it to apply to.

> 
> BTW Patrick raised the question of whether SVGA should apply to HTML, which I think means whether SVGA should be able to animate HTML attributes. I believe it should not, mainly because HTML's presentational attributes are deprecated. SVGA should certainly be able to animate CSS on HTML elements though.

I forgot to mention one other benefit SVGA has over CSS - the syntax is more friendly for authoring tools. I don't want to get into a huge debate about CSS vs XML though :)

So yes, it would be nice if SVGA applied to HTML where possible.

Dean

> BTW^2 it's probably better to start using the term "SVG Animation" instead of SMIL if we're going to diverge from the SMIL framework :-).

Received on Tuesday, 2 November 2010 19:38:35 UTC