Readit News logoReadit News
chrisweekly · a year ago
Even tho it's 8y old, Sarah Drasner's famous "SVG Can Do That?" talk is still eye-opening for many. CSS has matured a ton since then (I'm less sure about SVG per se)... in any case it's HIGHLY recommended.

Slides: https://slides.com/sdrasner/svg-can-do-that

Video: https://youtu.be/ADXX4fmWHbo?si=6YPZkopyEDc8PSte

Loading comment...

LegionMammal978 · a year ago
One fun thing that can be done with SVG files: you can use entities in an inline DTD to define constants to be shared across different places in the file. You can see some great examples of this in the SVGs in David Ellsworth's "Squares in Squares" page [0].

The major browsers have no issues with this, though note that some tools like Inkscape won't parse the DTD nor expand the entities.

[0] https://kingbird.myphotos.cc/packing/squares_in_squares.html

Loading comment...

Loading comment...

Loading comment...

Loading comment...

Loading comment...

Loading comment...

baosoy · a year ago
I worked on a project that did something fun with SVGs like this. It was built with React, and we had a series of still illustrations with an animated element, with its colour controlled by a CMS.

The frontend would basically call an API that would return an SVG image with the right colour assigned and the animation done by hiding and showing svg elements.

You can see an example here: https://web.archive.org/web/20221020133516im_/https://uncrow...

Loading comment...

Loading comment...

Loading comment...

Loading comment...