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

viewBox is removed when it's "0 0 width height" #5542

Closed
carsonb opened this issue Mar 4, 2020 · 3 comments
Closed

viewBox is removed when it's "0 0 width height" #5542

carsonb opened this issue Mar 4, 2020 · 3 comments
Assignees

Comments

@carsonb
Copy link

carsonb commented Mar 4, 2020

It looks like the default svgo process is to remove any viewbox that is 0 0 width height as a way to save bytes. When the viewbox isn't specified, it makes resizing SVGs a lot more difficult.

It would be swell if the gulp command disabled the removeViewBox plugin.
Happy to offer a PR if you're cool with a third party contributing one!

@vpicone
Copy link
Contributor

vpicone commented Mar 5, 2020

Moving this to the new repo. @joshblack should we archive this one?

@vpicone vpicone transferred this issue from carbon-design-system/carbon-icons Mar 5, 2020
@joshblack
Copy link
Contributor

Hi @carsonb! 👋 Unfortunately carbon-icons is our older project for iconography and has been replaced by @carbon/icons and @carbon/icons-react

In these setups, we do have removeViewBox disabled which should help to address this! https://github.com/carbon-design-system/carbon/blob/master/packages/icon-build-helpers/src/builders/vanilla/svgo.js#L137

@carsonb
Copy link
Author

carsonb commented Mar 10, 2020

Understood. Thanks for the info! Will switch to @carbon/icons as I wanted v10 icons all along.
Edit: the website references carbon-icons, which is why I started there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants