-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat(core): rewrite to use built-in svg components #239
base: next
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e2ca5e5
to
05d358c
Compare
a43bfff
to
52e0323
Compare
5148423
to
eb307b8
Compare
8c41d9b
to
0ab4604
Compare
d95749c
to
d35385c
Compare
a75764c
to
944b9b8
Compare
Warning
These changes are still highly volatile and likely to change. Proceed with caution
Building on top of the hopefully soon to be accepted Built-in SVG components in withastro/astro#12067. Discussed here withastro/roadmap#699
This adds virtual paths to the Iconify collections and icons. Simply import
astro:icons/<collection>/<icon>
in order to use the icon component.This changes also removes the functionality associated with local svg imports since this is now covered through Astro.
Another big change is that we're no longer running SVGO. I'm assuming that Iconify is handling most of the optimizations for us. Any local icon optimizations would be moved into the astro repo (likely post MVP)
TODO:
Possible Future Enhancements:
Typescript Plugin: We could write a typescript plugin that could autosuggest collections and icons as you type. We could also add additional validation for collection + icon combinations. We could also warn on deprecated usages.
Dev Toolbar: We could write a dev toolbar that could highlight all icons, show deprecated icons, and list all icons on the page. We could also potentially suggest icons that would be good candidates for sprite mode.