r/javascript • • Jul 18 '16

d4.js — declarative data-driven documents

https://d4.js.org
33 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/flying-sheep Jul 18 '16

i tend to use CSS transitions. they’re more performant anyway.

1

u/tbranyen Jul 19 '16

How do they relate to SVG? Seems like Web Animations are more in line with SVG stuff than CSS animations meant for HTML elements.

1

u/flying-sheep Jul 19 '16

“web animations”?

I only know SMIL and CSS animations/transitions. SVG can do both

1

u/tbranyen Jul 19 '16

Pretty sure css transitions dont work with svg attributes making them useless. Siml is deprecated?

1

u/flying-sheep Jul 19 '16

you’re right. CSS can only animate properties that have a CSS equivalent (e.g. fill, but not cx)

in the end i had to do e.g. all placement that i wanted to animate into transforms (which are animatable via CSS)