DEV Community

Cover image for One SVG Sprite Edit, Two Buttons Updated. What Did Git See?
Axialis Software
Axialis Software

Posted on

One SVG Sprite Edit, Two Buttons Updated. What Did Git See?

We changed a folder icon from blue to orange in an SVG sprite. After a browser reload, both Files and Project files turned orange. Their <use> elements point to the same ./icons.svg#icon-folder symbol.

The Files and Project files icons change from blue to orange after an edit to their shared SVG symbol. Search and Done look the same in both versions.
The Git diff showed one extra change. On save, the editor converted the folder’s rounded-corner arcs to cubic Bézier curves. The symbol kept its id and viewBox, and both references still worked.

After editing a shared sprite, we’d check both the browser and the diff. The browser shows whether each button still renders the icon. The diff shows what the editor rewrote on save.

We made the edit in IconVectors 2.30 for Windows, which we build at Axialis. The full write-up includes an interactive before/after demo and a ZIP with both SVGs and the diff.

See the full SVG sprite walkthrough

Top comments (0)