Skip to content

(Svelte) Render unmapped MDI icons in the Svelte client - #84

Merged
alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:svelte-fix-mdi-icons-missing
Oct 21, 2026
Merged

alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:svelte-fix-mdi-icons-missing

Conversation

@krixkrix

Copy link
Copy Markdown

config.xml names icons by MDI name ("mdi-library"), and vue2 ships the whole @mdi/font, so any MDI name works there. The Svelte client maps names to lucide icons through a short table and drew an empty circle for everything else. The example configs hit the same gap.

Names missing from the table now render from @mdi/font, the same font vue2 uses. The lucide table stays, so mapped icons look as before. The glyph is sized from the caller's h-/w- box (font-size 100cqh in a size container), so call sites are unchanged. Names that are not "mdi-[a-z0-9-]+" still get the circle, which keeps config values out of the class list.

NB: Adding @mdi/font as a devDependency

The lockfile carries only the @mdi/font entries; npm would also have rewritten unrelated "dev" flags.

config.xml names icons by MDI name ("mdi-library"), and vue2 ships the
whole @mdi/font, so any MDI name works there. The Svelte client maps
names to lucide icons through a short table and drew an empty circle
for everything else. The example configs hit the same gap.

Names missing from the table now render from @mdi/font, the same font
vue2 uses. The lucide table stays, so mapped icons look as before. The
glyph is sized from the caller's h-*/w-* box (font-size 100cqh in a
size container), so call sites are unchanged. Names that are not
"mdi-[a-z0-9-]+" still get the circle, which keeps config values out
of the class list.

The lockfile carries only the @mdi/font entries; npm would also have
rewritten unrelated "dev" flags.
@alexanderoster
alexanderoster merged commit f74b13c into alexanderoster:develop Oct 21, 2026
2 checks passed
@krixkrix
krixkrix deleted the svelte-fix-mdi-icons-missing branch October 22, 2026 07:49
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

Successfully merging this pull request may close these issues.

2 participants