Is there a way to change the viewBox attribute of an SVG element?
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- nuxt, typescript
- Domain
- frontend
Research direction
Start by reading the @nuxt/icon documentation and the implementation of the customize function and component. Reproduce the Ant Design collection case and inspect the rendered SVG viewBox. Done means documenting or supporting a clear way to set viewBox="64 64 896 896" for the affected icon.
Written by the indexing model from the issue text.
Description
While using @nuxt/icon with the Ant Design icon collection, I noticed that the icon sizes don’t quite match those on the Ant Design website. The issue is that icons on the Ant Design website have viewBox="64 64 896 896", whereas icons from the collection have viewBox="0 0 1024 1024" in the svg element.
How can I change the viewBox attribute value? I tried using the customize function and setting the viewBox attribute on the <Icon /> component, but it doesn’t work.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from nuxt/icon
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Allow separate providers for SSR and client (`provider: { server, client }`)Possibly taken @pont1s claimed this 24 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Remote server bundle duplicates concurrent collection downloadsPossibly taken @onmax claimed this 47 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endora-commerce/endora-commerce#397 ·
Maintainers usually reply within 1 day
-
level/task
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opennextjs/opennextjs-cloudflare#1461 ·
Maintainers usually reply within 1 day