Custom icons cannot change color and the overlay svg color is still black
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 96
- Avg merge
- 8h 12m
- Merged PRs (30d)
- 2
Description
My situation is summarized as follows:
I've upgraded @nuxt/icon to 2.0.0, and the SVG file doesn't have a hard-coded fill.
I'm using the method to call the local SVG.
I'm using .icon { color: var(--neutral); } to control the color, but the icon is still always black.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with @nuxt/icon 2.0.0, a local SVG without a hard-coded fill, the usage, and the .icon color rule. Trace how custom and overlay SVG colors are handled, then verify that the rendered icon follows the configured CSS color instead of remaining black.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, nuxt, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100