Skip to content
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

SVG icons for plugins #736

Open
Artoria2e5 opened this issue Jun 3, 2024 · 1 comment
Open

SVG icons for plugins #736

Artoria2e5 opened this issue Jun 3, 2024 · 1 comment

Comments

@Artoria2e5
Copy link

Artoria2e5 commented Jun 3, 2024

The current @icon value injected during build are all PNGs. It could be a good idea to replace them with minified SVG files where that makes sense.

I noticed that the icons are a little blurry when I finally added an icon to my plugin:

image

My plugin's icon stands out among all the rest because it's an SVG. Maybe we can move some official plugins to SVG too? For what is worth, the SVG is 1.7 kb -- not that different from the PNGs in https://iitc.app/extras/plugin-icons/, and even smaller than them if you gzip.

(My icon also stands out because it doesn't have the right black border and corners, but that, too, can be solved when we have official SVGs.)


"where that makes sense" is because we have some icons that aren't drawn by us, like the basemap icons.

@Artoria2e5
Copy link
Author

Artoria2e5 commented Jun 4, 2024

Alright, first issue with this: my script's @icon is not showing up in Tampermonkey. This of course won't affect whatever I want to do to IITC Button, but it's annoying and I want to know why: does Tampermonkey not understand SVG (unlikely: Tampermonkey/tampermonkey#1500 works), or did it get confused by GitHub's awful Content-Type?

Yep, works with jsdelivr. Is content-type issue, won't happen with your iitc.app server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant