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>
1 line
718 B
XML
1 line
718 B
XML
<svg fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M5.042 17.5Q3.646 17.5 2.656 16.51Q1.667 15.521 1.667 14.125Q1.667 12.729 2.656 11.74Q3.646 10.75 5.042 10.75Q6.438 10.75 7.427 11.74Q8.417 12.729 8.417 14.125Q8.417 15.521 7.427 16.51Q6.438 17.5 5.042 17.5ZM10 9.25Q8.604 9.25 7.615 8.26Q6.625 7.271 6.625 5.875Q6.625 4.479 7.615 3.49Q8.604 2.5 10 2.5Q11.396 2.5 12.385 3.49Q13.375 4.479 13.375 5.875Q13.375 7.271 12.385 8.26Q11.396 9.25 10 9.25ZM14.958 17.5Q13.562 17.5 12.573 16.51Q11.583 15.521 11.583 14.125Q11.583 12.729 12.573 11.74Q13.562 10.75 14.958 10.75Q16.354 10.75 17.344 11.74Q18.333 12.729 18.333 14.125Q18.333 15.521 17.344 16.51Q16.354 17.5 14.958 17.5Z"/></svg> |