Svgr: Why is viewBox stripped (by default)?

Created on 15 Jul 2019  Â·  5Comments  Â·  Source: gregberge/svgr

In the settings for SVGO, the viewBox is stripped by default? What is the reasoning behind this, because it breaks proper scaling. I have difficulty to understand why the viewBox should be stripped in the first place? I have never encountered a situation where I didn't want the viewBox.

All 5 comments

Hello @avwie, you should ask SVGO team about that.

That is weird, why should I ask them? It is just a library feature of SVGO. Why have you enabled it as default behavior in SVGR, breaking proper scaling? That is the question. It is just a setting of SVGO, but you opted to enable it by default. The question is why? Is there something I am missing?

I don't want to override the default from SVGO. So I rely on SVGO default in SVGR.

so what should i do to make proper scaling?

You can add a SVGO config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregberge picture gregberge  Â·  6Comments

7ynk3r picture 7ynk3r  Â·  4Comments

SilencerWeb picture SilencerWeb  Â·  4Comments

kg-currenxie picture kg-currenxie  Â·  4Comments

runeh picture runeh  Â·  4Comments