Add SVG sprite sheet to the distribution? #1929
mariusnita
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Sprite sheets were an addition to the default way of loading icons, which is fetching SVGs on demand. We do it that way because most apps only need a handful of icons and it doesn’t make sense to load all of them — a very expensive HTTP request. Sprite sheets are more of an advanced feature where you subset just the icons you need into the sheet and register a custom library. If we offered the sprite sheet out of the box, it would encourage the bad practice of loading all icons up front and by default. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I noticed the icon sheet
sprite.svg
is included in the built docs. Would it make sense to include the sprite sheet in the Shoelace distribution? Then users could register an icon library pointing to the sprite sheet, without having to build the sheet. I'd like to do that, and it's not clear how to build the sprite sheet so it matches the built-in icon library 1-1.Beta Was this translation helpful? Give feedback.
All reactions