-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<symbol> + <use>? #68
Comments
Hi @mustafa0x! I'm not sure what you'd like this plugin to achieve in this case? |
I think he is about using SVG sprites: https://css-tricks.com/svg-sprites-use-better-icon-fonts/ |
Yes, sorry for not clarifying. I'm trying to figure out the easiest way to reference a Given this svg <svg style="display: none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol id="logo" viewBox="0 0 20 20"><path d="..."/></symbol>
</defs>
</svg> I'd like to get <script>
import Icons from "./icons.svg?component"
</script>
<Icons id="logo" /> or this <script>
import Logo from "./icons.svg?component&symbol=logo"
</script>
<Logo /> |
I will look in to this during the hollidays, to see if I can come up with a viable solution. |
Awesome project, thanks! I have an svg file with content like
Then I would embed a specific symbol using
<svg class="icon"><use href="icons.svg#foo"></svg>
Using this plugin, is there an easy way to achieve this?
The text was updated successfully, but these errors were encountered: