Re: Animating SVG with CSS

On Thu, Sep 18, 2014 at 12:31 PM, Juergen Roethig
<roethig@dhbw-karlsruhe.de> wrote:
> And that is the great "feature" what might easily break existing content: If
> an attribute (let's take "x" as an example, and let's even add a second one,
> "y") happens to become a presentation attribute (in order to make it work
> with CSS animations or whatever), which it is was definitely not in SVG 1.1,
> a simple CSS rule of
> * { x: 47; y: 11; }
> which did not do any harm, so far (since unknown CSS properties _must_ _be_
> _ignored_ by browsers, according to _any_ _CSS_ _spec_ in my knowledge),
> makes all my SVG objects using individual x and y attributes appear at the
> very same place (47,11). One might address this issue by changing the
> precedence of CSS rules over presentation attributes vice versa, but such a
> change might break other existing content :-(
>
> That's why I am sure that with this version-less web-language handling, many
> more problems will arise (or exist already) than what will be "solved".

This issue is present with literally every property we ever introduce
to CSS; it's theoretically possible that someone might have created an
invalid property with that name, which suddenly becomes valid and
starts doing unexpected things.  We generally consider this a
non-issue.

This is part of the reason why CSS does *not* expose unknown
properties to the author; this discourages unknown properties from
being used/abused in this manner.

~TJ

Received on Thursday, 18 September 2014 19:41:41 UTC