Dev.to WebDev πŸ›  Dev πŸ‘ 0

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 Git diff sho

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

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.