Closed JoKalliauer closed 5 years ago
@JoKalliauer: The error comes from csso
package used by the minifyStyles
plugin:
$ svgo --disable={minifyStyles,inlineStyles} -i test.svg -o test.min.svg
test.svg:
Done in 67 ms!
11.228 KiB - 1.7% = 11.034 KiB
/cc @strarsis i think we should disable css minification by default, it is not safe because csso is not maintained
@evilebottnawi: *Or replace it with another CSS minifier.
cssnano :smile:
@JoKalliauer, @evilebottnawi:
Prepared a PR that replaces csso
with cssnano
: https://github.com/svg/svgo/pull/1127/
cssnano
will support required synchronous usage in next release
Edit: After some discussions, it was decided to not replace csso
with cssnano
because csso
offers structural optimization which cssnano
doesn't.
The issue was fixed in CSSO 4.0.2.
@lahmatiy: Awesome!
@GreLI: PR ready for updating csso
to 4.0.2
: https://github.com/svg/svgo/pull/1172
@JoKalliauer: The SVG has been added as test to cause the csso
error, and
after updating csso
to 4.0.2
the test SVG minifies just fine.
v1.3.1 with the fix is just released.
Processing File:Talehunt_logo.svg (MWE: Bug1097.svg.txt ) with
leads to
Input
Bug1097.svg.txt
Copyright
Author: *'''Original creator:''' TaleHunt *'''Tracing and conversion to SVG:''' {{U|Arv1989}} *'''Code optimization:''' {{u|Codename Lisa}} LIzenze: [cc-by-sa-4.0](https://creativecommons.org/licenses/by-sa/4.0/) Source: https://commons.wikimedia.org/wiki/File:Talehunt_logo.svg