Re: Animating SVG attributes from Web Animations

On Wed, Jun 17, 2015 at 11:42 AM, Bob Hopgood <frahopgood@gmail.com> wrote:
> It is unclear to me that CSS has any idea what it is letting itself in for
> if it decides to style or animate the  d attribute of the SVG path
>
> I have a very low definition outline of Australia which is  a 50,000 bytes d
> attribute and a high definition path description of the coastline is 1
> Megabyte.
>
> All current browsers can render  these and animate them. Is CSS really going
> to put strings that long in style rules?

The subject of the thread is the Web Animations JS API, not CSS.

(But there's nothing wrong with putting strings like that in CSS; I'm
unsure why you think there's a meaningful difference between <path
d="giant string"> and <path style="d: 'giant string'">.)

> Much better to leave the SVG attributes where they are and just work on the
> styling properties
>
> The d attribute in SVG acts much like the text in an HTML block-level
> element such as p or h2.
>
> Css does not plan to modify that so why do it to the d attribute in SVG?

A <path> carries no intrinsic meaning, just like an <img>; it is
completely opaque to a search engine, screen-reader, or other
machines.  It is entirely unlike text content.

~TJ

Received on Saturday, 20 June 2015 02:52:41 UTC