unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
4.11k stars 144 forks source link

Feature: generate static css icon #390

Open robokozo opened 1 day ago

robokozo commented 1 day ago

Clear and concise description of the problem

I've read https://antfu.me/posts/icons-in-pure-css and I recently watched the @antfu nuxt nation presentation around icon loading strategies and was disappointed to learn I wouldn't be able to leverage css icons on an icon heavy work project because it doesn't use unocss.

I understand from this https://github.com/unplugin/unplugin-icons/issues/331 that this type of work is considered out of scope for this particular project, but seeing as there was already a PR for this feature and per @userquin suggestion on https://github.com/unplugin/unplugin-icons/issues/88 I'd like to reopen this discussion. I still think there is general interest in having this feature merged in.

Suggested solution

It seems a lot of work went into attempting to include this functionality originally in https://github.com/unplugin/unplugin-icons/issues/88

Or maybe some documentation around how this can be achieved in vue/react/etc without a specific css framework.

Alternative

N/A

Additional context

No response

Validations

antfu commented 1 day ago

I believe this feature would be better fit into a separate plugin - Iconify already provides a few utilities to generate CSS icons easily - feel free to take the idea and make your own project. If you end up using unplugin and has a solid code base, we'd be happy to discuss if moving into organizations and collaborate, etc.