-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Feature: generate static css icon #88
Comments
Would you expect this as a dedicated mode or do you want to use this solution as a complement of the component solution? I guess we could have something like import "~icons/mdi/alarm.css" to generate the corresponding CSS for each component. Don't have the bandwidth right now but PR welcome. |
Yes, that would be a nice framework agnostic way to use that. I guess this could be independent/complementing mode to the component mode. |
I'll take a look |
@husayt Here is the result (you can see the branch an the new On vite we have free HMR on dev: |
@husayt you can also use custom loader (from svg files for example) to display it as css icon instead svg/component. |
@userquin excellent stuff. Thanks |
@husayt closing this since it has been included on unocss, if you want still this behavior open a new one issue. |
Maybe it can be useful for vitepress (which doesn't use uno nor tailwind by default)? |
how can i add defaultClass or otherClass |
Now I can only add css attributes, but I need to add a class to each icon |
Sometimes especially when working with non vue components one needs to have icons defined at css level e.g.
then it can be used as
<span class="my-icon-stats"></span>
even without Vue or other framework. This will not be useful for every framework combination but will also allow for this library to be used with no framework as well.I guess this might be possible with unplugin-icons on demand via special command or syntax, especially since most of the svg extraction is done.
The text was updated successfully, but these errors were encountered: