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

Custom icons must be in kebab case #265

Open
huang-julien opened this issue Oct 1, 2024 · 3 comments
Open

Custom icons must be in kebab case #265

huang-julien opened this issue Oct 1, 2024 · 3 comments

Comments

@huang-julien
Copy link
Member

huang-julien commented Oct 1, 2024

Description

iconify's getIcon uses validateIconName which enforce some validation for an icon's name.

One validation is that a name must be split with - which is often not the case with users custom icons

Reproduction

https://stackblitz.com/edit/nuxt-starter-qlykyd?file=icons%2FEuro.svg,nuxt.config.ts,app.vue

in this reproduction, we can't see my-icons:Euro because Euro is in PascalCase

Solution

Either a documentation fix about naming convention or fix it in iconify or we could also merge prefix with the name ?

@YaredFall
Copy link

YaredFall commented Oct 9, 2024

Stumbled upon this quirk too.

It seems that only lowercase letters, digits and dash (-) is allowed inside icon filename.

I was hoping to be able to use uppercase letters and underscores... I wonder why this naming convention is never mentioned in the docs.

@huang-julien
Copy link
Member Author

Because we're using @iconify and this is the convention @iconify uses

@huang-julien
Copy link
Member Author

I'll work on it when i have some free time

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

2 participants