Technical Experiments

Bridging design and code through technical experiments with SVG

Role

Designer, Developer

Timeline

2018-Present

Tools

Adobe Illustrator, VS Code

OVERVIEW

SVG graphics enabled me to create visuals directly through code, leading to years of experimentation building interactive graphics and tools, as well as producing educational content.


THE SPARK

Finding the direct line between SVG code and visual output

My interest in vector graphics and web design pulled me toward SVGs. The first time I edited a value in the SVG code and saw the visual update, I was hooked.

That had me wondering, what else can I do?

Wiring the first feedback loop between input and visual output

SVG's core attributes are just numbers in the markup. That made range sliders a natural fit, a decision I wrote about. A min, max, step size, and current value was all it took to put direct visual control in a user's hands. Targeting foundational attributes like opacity, stroke-width, width, and height first confirmed the pattern worked reliably.

CHALLENGE

But not every attribute was a single number.

STROKE

Drag the slider — Early exploration of basic attribute manipulation.

Solving scaling problems by adopting SVG's built-in pattern tag

Pattern tiling with CSS background images worked until rounding errors and sub-pixel gaps exposed the limits of custom calculation. SVG's native <pattern> element handled the math internally far more reliable and even unlocked pattern rotation.

SCALE

ROTATE

Drag the slider — All patterns now use the same scaling and rotation controls.

Overcoming transform complexity and unpredictable transform origins

Unlike simple numeric attributes, transform values are compound strings — rotate, scale, and translate chained together, each dependent on the others. That required its own parsing system just to wire up controls.

transform="rotate(90 500 400) scale(1 1.2) translate(0 -50)"

CHALLENGE

Harder still, transform order matters: the same operations in a different sequence produce a different result. And scaling shifts the coordinate system entirely, making transform-origin: center unreliable.

SOLUTION

Finding the solution had me scour the internet down many dead ends, but a comment in a Stack Overflow post helped me piece together a workaround. The solution was to lead with rotate using its explicit center coordinates, then wrap scaling in a translate/reverse-translate pair to compensate. Keying this complexity into a single slider unlocked a new category of designs: elements that rotate, shift, scale, and assemble into parabolic aand other geometric forms.

TRANSFORM

Drag the slider — Transforms unlocked new design possibilities.

THE SPARK

Applying my SVG knowledge to the new challenge of animation

I'd animated SVGs before, but always through JavaScript. The more time I spent inside SVG markup, the more I was curious about SMIL, SVG's native animation language.

Animating SVG gradients in ways CSS could not support at the time

Having hit dead ends animating gradients through CSS in the past, it was one of the first things I tested with SMIL and it worked. A video of me explaining the technique reached 10,000 views, a signal that others had hit the same wall.

Video still: animating SVG gradients with SMIL on YouTube

CSS can't animate gradients, but SVG can

I explain how to use SMIL to animate gradient color stops, something CSS couldn't do in 2022.

Watch video

Animated backgrounds became the number one requested item from customers

Researching SVG's uncertain animation future and publishing the results

Customer requests pushed animation up the priority list, but choosing the right tool mattered. GSAP was an option, but relying on an external library conflicted with SVG Backgrounds' self-contained, copy-and-paste designs. SMIL kept the animation inside the file itself avoiding dependencies.

The problem was an influential article had declared SMIL dead. Researching the claim uncovered a more optimistic picture: the deprecation decision had been reversed, and browser support had improved as SMIL outlived the browsers that made it problematic. I published my findings in an in-depth article and made the call to ship with SMIL.

Featured image for the article Is SMIL dead in 2022? Nope on SVG Backgrounds

Is SMIL dead in 2022? Nope

While the future looks iffy, SMIL was never deprecated and works on modern browsers.

Read article

Building animated preloaders by coordinating multiple animation parameters

Preloaders are typically graphics with a simple repeating motion sequence, a fitting use case for SMIL, especially since both the graphic and animation are stored in a single self-contained file. Compared to animated GIFs, equivalent designs came in 20-40x smaller. Building a variety of preloaders meant experimenting with SMIL's full range of animation parameters and targetable elements. That exploration became a product: a collection of 24 preloaders for SVG Backgrounds members.

Video still: Animating preloaders with SVG on YouTube

Animating preloaders with SVG

I break down the tricks I used to animate SVG preloaders with SMIL.

Watch video

Pause or resume all SMIL timelines in the grid.

THE SPARK

Understanding performance by working directly with SVG output

Unoptimized SVGs aren't just inefficient, they're slower to load, harder to maintain, and defeat the purpose of using SVG in the first place. SVG is lean by nature, but I learned fast that design choices could undo that entirely. I was on the case when two similar designs produced wildly different amounts of code.

Witnessing first-hand how design choices increased file size

The obvious culprits were easy to spot: too many elements, complex paths with dense anchor points, coordinates carrying way too many decimal places. The less obvious patterns emerged when comparing my software's raw output to code after a pass through an optimizer.

A screenshot of removing hidden anchor points
Path bloat

Changing my design approach to produce smaller, more efficient SVGs

Once I've spotted common causes of character bloat, I started thinking about ways around the problem, leading me to consider file size as a design constraint.

For instance, Illustrator makes it trivially easy to add anchor points and surprisingly hard to remove them. Getting them out safely, without affecting the visual, meant building a toolkit of strategies:

  • Smooth tool simplifies curves, often with fewer anchor points
  • Remove points hidden behind other elements or off-screen
  • Merge separate shapes into a single path
  • Use a plugin to reduce unnecessary anchor points mathematically
  • SVG optimizers rewrite paths with fewer characters
A screenshot of removing hidden anchor points
Example of removing a hidden anchor point

Writing SVG markup directly to achieve maximum optimization

Design tools have a ceiling. Some optimizations are only possible when writing markup directly.

The perfect example is that <use> clones complex elements by reference to avoid repeated markup. Nesting those clones made intricate designs like halftone patterns achievable with minimal code.

Beyond that, there's a small list of other techniques, such as grouping elements to share <fill>, <stroke>, and <opacity> attributes trimmed the redundancy that exporters routinely leave behind.

45 elements in the code, 3,600 on screen. Achieved by nesting <use> clones.

Documenting my optimization discoveries into an educational resource

After years of working with SVGs, I decided to write about my optimization strategies. I pulled together every technique I'd considered, tested, and applied into a complete reference for reducing SVG file size. It has since brought in consulting inquiries from teams dealing with these types of problems at scale.

Featured image for How to optimize and reduce the file size of SVG images on SVG Backgrounds

How to reduce the file size of SVG

I break down every possible way to shed bytes from SVGs, to keep website load times fast.

Read article

Outcome

Working directly with SVG reshaped how I approach design.

Performance and portability became design constraints rather than post-production concerns. SVGBackgrounds.com adopted a self-contained, copy-and-paste philosophy, influencing both product decisions and technical direction.

A Growing Ecosystem

  • 2500+ SVG backgrounds, icons, and other website graphics
  • Tools including an SVG-to-CSS converter and shape divider generator
  • Over one million exports and 1,000+ customers served over time

Sharing What I Learned

  • 50+ educational videos and articles documenting techniques and discoveries
  • 125,000+ YouTube views from designers and developers facing similar problems
  • Consulting inquiries and an invitation to appear on Chris Coyier's podcast

Continuing impact

Years of technical experiments evolved into concrete tools, products, and resources, most of which remain actively used today.

The original experiment that launched SVG Backgrounds created an ongoing feedback loop: publish an idea, learn from users, experiment again, and turn successful explorations into products and systems.

The work keeps returning me to the same question:
what else can I do?