Post

@_developit If you define them in <defs> do all the SVGs have to be defined inline? One for the defs and then one for each usage?
English

@_developit What's the best approach to use in web components? I assume <use> won't work as it uses URI fragments. Cloning svg using <template>?
English

@_developit What about a web component that fetches them on request? twitter.com/galstar/status…
Schlez@schniz
🕺 Fun experiment: ViewComponent opens the door for amazing things in @rails. Loading SVG dynamically with HTML custom elements, while registering a preload header. Super fast loading (no request waterfall) AND allowing SVG to be cached by the browser! gist.github.com/Schniz/33179cc…
English

@_developit <img> doesn't work with CSS and currentColor for fill. When using React putting it into JSX in React components is the easiest. With code splitting it's not as bad I guess.
Is there an easy solution (e.g. bundler-based) for the <use> approach? That would probably be best.
English

@_developit They are not cheap when they are 3000 elements (tried going this route with an emoji keyboard, font or png sprite is so much better)
English

@_developit That's interesting for sure. I assume same will apply for any webcomponent event using <svg>?
English

@_developit @nuxt_js I think there's an opportunity here to introduce a performance win regarding this comment with the following PR. github.com/nuxt-community… cc. @_pi0_ @Atinux
English

@_developit I'm mostly use symbols or in combination with `img`.
English

@_developit So if I have an Icon component which has a map of imported icons and renders the SVG based on a name prop. What’s the best solution here when importing the svgs? I’m currently lazy loading the imports but that might not be the best solution 🤷♂️
English


