nuxt / nuxt/icon

Custom icons cannot change color and the overlay svg color is still black

Open
#423 2 comments 3 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.