Draw the 67 Material Symbols Google ships without a viewBox at every size
Google publishes 67 symbols per cut (auto_awesome, insights, tips_and_updates, battery_50 ...) with width and height but no viewBox, their paths in 24 units, or 20 in the 20 cut, where every other symbol draws in `0 -960 960 960`. bin/fetch-symbols dropped the size so CSS decides it, which left these with no coordinate system: `<x-icon>` drew them at 1:1, whole only at exactly 24px and cut off or misplaced at any other size, the 20 cut every small button uses included. normalise() now turns a file's width and height into its viewBox when it has none, before dropping them. The 268 files are regenerated from Google's originals at the recorded SOURCE commit with the fixed step (each shipped file matched the old step's output first; the other 16,272 do not change), and every path lies inside its new viewBox. IconTest checks that each shipped symbol has a viewBox and that `<x-icon name="auto_awesome">` renders in 20 units at size 16 and in 24 at size 32; both fail without the change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
b7e16476cd
commit
7a95449c82
@@ -1 +1 @@
|
||||
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M12.725 16.325q.275-.275.275-.7 0-.425-.275-.7L11.8 14H15q.425 0 .713-.288Q16 13.425 16 13t-.287-.713Q15.425 12 15 12h-3.2l.925-.925q.275-.275.275-.7 0-.425-.275-.7-.275-.275-.7-.275-.425 0-.7.275L8.7 12.3q-.3.3-.3.7 0 .4.3.7l2.625 2.625q.275.275.7.275.425 0 .7-.275ZM4 20q-.825 0-1.412-.587Q2 18.825 2 18V6q0-.825.588-1.412Q3.175 4 4 4h5.175q.4 0 .763.15.362.15.637.425L12 6h8q.825 0 1.413.588Q22 7.175 22 8v10q0 .825-.587 1.413Q20.825 20 20 20ZM4 6v12h16V8h-8.825l-2-2H4Zm0 0v12Z"/></svg>
|
||||
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.725 16.325q.275-.275.275-.7 0-.425-.275-.7L11.8 14H15q.425 0 .713-.288Q16 13.425 16 13t-.287-.713Q15.425 12 15 12h-3.2l.925-.925q.275-.275.275-.7 0-.425-.275-.7-.275-.275-.7-.275-.425 0-.7.275L8.7 12.3q-.3.3-.3.7 0 .4.3.7l2.625 2.625q.275.275.7.275.425 0 .7-.275ZM4 20q-.825 0-1.412-.587Q2 18.825 2 18V6q0-.825.588-1.412Q3.175 4 4 4h5.175q.4 0 .763.15.362.15.637.425L12 6h8q.825 0 1.413.588Q22 7.175 22 8v10q0 .825-.587 1.413Q20.825 20 20 20ZM4 6v12h16V8h-8.825l-2-2H4Zm0 0v12Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 559 B After Width: | Height: | Size: 579 B |
Reference in New Issue
Block a user