Post

@_developit What if each SVG is a component?
Wouldn't tree shaking (mostly) solve this?
English

@_developit Just want to know what would be the best way to use svg. Some time i use them as a component. Thank you .
English

@_developit Unless of course you are going to animate the SVG or you want the SVG to be themed by your css-in-js's context
English

@_developit What about if you have loads of icons, it's quite common to want to modulate the color of the svg icon. Having it as jsx is super convenient! Doing this with URLs would be annoying?
English

@_developit Thanks for sharing! I'm a bit lost as to *why* it costs 3x more and the performance is bad though. Care to explain?
English

@_developit what about dynamic import the icons instead build it in the bundle? as @elastic/eui did
English

@_developit @smashingmag For those wondering, here's how to create an svg sprite sheet using <symbol> instead of <def> so each sprite can have independent viewBox=, and up to 2 colours defined in .css files: github.com/jesstelford/co…
English

@_developit Just to be sure I'm understanding, this icon component at the bottom is no worse for the performance of your app than the paragraph component above it right?

English

@_developit We've tried many tactics, but this has been working well for Ionicons @5.5.1/icons/index.mjs" target="_blank" rel="nofollow noopener">unpkg.com/browse/ionicon… So you can import individual icons as datauri strings, use them in an img, or in ion-icon web component which turns it into an actual <svg>. But that's one of a few formats
English

@_developit Yeah unfortunately lulu does this. 800ms of blocking time is related to svg hydration
English

@_developit Haven't tried it but I assume putting them in a <template> in the HTML and cloning from there works?
English

@_developit When using http2, is it still recommended to go with svg sprites (and possibly download unnecessary icons), or would it be better to load each individual svg separately?
English

@_developit I prefer purely CSS based icons CSS.gg nowadays, wherever I can. Re-use shouldn't lead to duplication in the final markup, and if it's there it should be light enough to not penalize the download size much.
English



