Closed strarsis closed 4 years ago
Anyone figure out a fix for this?
@tedw: Apparently there are different ways for exporting this from Illustrator.
Or run it through svgo
first and hope it fixes these coordinates (there was a related bug in svgo
that has been fixed now).
@strarsis Ah ok, was hoping there was a way to fix in PostCSS. Will try tweaking the SVGO config, perhaps it’s related to “convertPathData” for my particular SVG. Thanks!
Turns out it was due to an outdated version of svgo
in this framework I’m using.
So this is the problem of svgo, right?
@TrySound Yup, can close 👍
FWIW, in my case it was an old version of css-loader
that was loading an old version of svgo
(https://github.com/svg/svgo/issues/990#issuecomment-570012473)
The plugin would inline path components incorrectly (values as
NaN
) when the path components are not separated by spaces, however, path components not separated by space seem to be valid SVG and also render correctly in a browser like Chrome:Input (renders correctly in browser):
Output (doesn't render correctly in browser as of obvious reasons):