nuxt / nuxt/icon

Use css icon data as mask-image

Open
#367 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

Hello
In your playground where is a possibility to set mode: css and image span will have --svg variable which could be used as value for mask-image
In getIconCss method there is property mode: mask which can return this variable
https://iconify.design/docs/libraries/utils/get-icon-css.html#geticoncss

In latest @nuxt/icon svg content in mode: css always uses as background-image value/

Can you add property which allows to get --svg variable which could be used as value for mask-image?

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

Start with the getIconCss method and the playground behavior described in the issue, then compare the existing mode: css and mode: mask handling. Verify how the --svg variable is exposed and how the latest @nuxt/icon output currently uses background-image; done means the CSS data can be used as a mask-image value.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.