-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Please establish lossless and secure compression as the primary idea #1360
Comments
May I add that we should change the default options to only include those plugins known/supposed to be lossless. For example |
Or we should make it safe. |
Ref #1362 #1360 From the [spec](https://www.w3.org/TR/SVG11/styling.html#UsingPresentationAttributes): > Presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes. Though we replace inline styles with attributes without checking if thare is any `<style>` element. This makes the plugin unsafe and it should not be enabled by default.
Ref #1362 #1360 From the [spec](https://www.w3.org/TR/SVG11/styling.html#UsingPresentationAttributes): > Presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes. Though we replace inline styles with attributes without checking if thare is any `<style>` element. This makes the plugin unsafe and it should not be enabled by default.
Another case here is |
We have now presets concept. I'm ok to implement different presets. Though would be good if somebody explore all plugins. |
Closing this as we're now actively striving for this, but the issue isn't presented in a way that we can track progress and know when it's complete. If you have concrete suggestions, you're encouraged to open another issue with what we can specifically do better. Meanwhile, I'm not at all dismissing the issue. All future development is done with lossless compression in mind. We're investing a lot of time and effort in fixing bugs, improving testing, and having more complete documentation to clarify potential quirks. I'm also working on new sections to include in the documentation to clarify what we optimize, and in what cases we may deem something more important than reducing bytes. In recent released, I believe we've already made good progress, and will continue to do so. 👍🏽 |
As an svg compressor, I think it is most important not to change the display effect of the svg itself, which means that the compressed result cannot change the shape, position, size, color, etc. (svgcleaner has a detailed description). As svgo is adopted by more and more non-browser terminals (Sketch, Adobe Illustrator, other back-end languages), this will become more and more difficult, because each side implements svg differently. So we urgently need to introduce Correctness test like svgcleaner to help svgo become the best svg compressor.
The following work is a good start:
noSpaceAfterFlags
option is disabled by default @yisiblcc @deepsweet
The text was updated successfully, but these errors were encountered: