Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not using fill attribute creates fill in stroke only SVGs - no way to target stroke! #4

Open
McPizza0 opened this issue Jun 15, 2022 · 5 comments

Comments

@McPizza0
Copy link

McPizza0 commented Jun 15, 2022

My Icon pack mostly makes use of stroke in the SVGs

When NOT using the fill attribute, all strokes in the SVG are filled with shapes. This breaks the icons visually.
Adding the fill attribute fixes rendering.
This is linguistically confusing as you are adding a fill color by not using fill attribute - but using fill attribute uses the original fill? 🤔

Also There is currently no way to target the stroke of the SVG to set color.

p.s. @gitFoxCode Epic work here! Exactly what I was looking for!

@mrleblanc101
Copy link

@gitFoxCode Maybe it would be a good idea to rename fill to preserve-fill as this package fill is a Boolean props and not a DOM attribute fill="#ff0000".

@yisibell
Copy link

@gitFoxCode
Copy link
Owner

try this https://github.com/yisibell/nuxt-svg-icons

At what point does this module support stroke? This module which defacto is a modified nuxt-icons also does not support outline-icons from advance. Currently, this can be done in pure CSS, but to improve DX I would have to come up with a good syntax and that wouldn't bite with many icon possibilities

@yisibell
Copy link

try this https://github.com/yisibell/nuxt-svg-icons

At what point does this module support stroke? This module which defacto is a modified nuxt-icons also does not support outline-icons from advance. Currently, this can be done in pure CSS, but to improve DX I would have to come up with a good syntax and that wouldn't bite with many icon possibilities

In nuxt-svg-icons version 1.6.0, My strategy is to handle the stroke and fill attributes through svgo so that they can be modified directly on the svg node.

@yisibell
Copy link

yisibell commented Feb 22, 2023

try this https://github.com/yisibell/nuxt-svg-icons

At what point does this module support stroke? This module which defacto is a modified nuxt-icons also does not support outline-icons from advance. Currently, this can be done in pure CSS, but to improve DX I would have to come up with a good syntax and that wouldn't bite with many icon possibilities

As for svg 's width and height which also processed by vite-plugin-svg4vue, so that you can directly use font-size to set, and your svg size will be responsive

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

No branches or pull requests

4 participants