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

Remove postcss-svgo from the default preset #992

Closed
nex3 opened this issue Feb 6, 2021 · 11 comments
Closed

Remove postcss-svgo from the default preset #992

nex3 opened this issue Feb 6, 2021 · 11 comments
Labels
Milestone

Comments

@nex3
Copy link
Contributor

nex3 commented Feb 6, 2021

The svgo package which postcss-svgo uses has a large number of outstanding bugs, a number of which I've personally seen result in changes to the rendering of SVGs embedded in CSS files. In addition, the project seems to have been abandoned, with 59 open pull requests and no commits since December 2019. In light of this, I believe it is no longer on track to meet the default preset's goal of never changing input CSS in a way that could cause rendering differences, and as such it should no longer be enabled by default.

@alexander-akait
Copy link
Member

Yep, I agree, sometimes I think we need to switch on https://github.com/cssnano/cssnano/tree/master/packages/cssnano-preset-lite by default, it is faster and it is safe (only spaces, comments and empty rules)

@nex3
Copy link
Contributor Author

nex3 commented Feb 7, 2021

I get a lot of value out of having a broader set of defaults that encompasses everything that's believed to do safe optimizations independent of semantics, but as long as that's also available as a preset I'd be happy.

@yisibl
Copy link

yisibl commented Feb 23, 2021

I am happy to tell you that svgo has found a new maintainer(@TrySound ), and we have re-established security as the core idea, and look forward to working with the PostCSS community.

It would be better if @ben-eb had time to re-maintain postcss-svgo. Ben-eb is also an excellent open source contributor to the PostCSS community.

@ben-eb
Copy link
Collaborator

ben-eb commented Feb 23, 2021

@yisibl I'm afraid it's not possible right now, my work for the time being has little to do with CSS and so I can't justify any current contributions to this project.

By the way note that postcss-svgo moved to here as part of the monorepo and I will be clearing out archived repositories soon: #994

@nex3
Copy link
Contributor Author

nex3 commented Feb 25, 2021

@yisibl @TrySound Once svgo is in a place where you feel like it should be safe to apply to arbitrary SVGs, let me know and I'll run a test over all of Google's screenshot tests to see if anything breaks in practice.

@yisibl
Copy link

yisibl commented Feb 25, 2021

@ben-eb @nex3 Thanks.

@ludofischer
Copy link
Collaborator

If things are so bad with the previous SVGO version, we could update to SVGO 2 for the 5.0.0 release. @anikethsaha @alexander-akait any thoughts?

@anikethsaha
Copy link
Member

Yea I think we should include the SVGO v2 as even if there are breaking changes, it wont be an issue.

👍

@alexander-akait
Copy link
Member

@anikethsaha Yes, PR welcome

@ludofischer
Copy link
Collaborator

PR to update SVGO to newly maintained version 2: #1016 SVG experts are welcome to suggest improvements.

@ludofischer ludofischer added this to the 5.0.0 milestone Mar 19, 2021
@ludofischer
Copy link
Collaborator

Closing this since SVGO is maintained again. We could open an issue for changing the default preset to lite though (as #992 (comment) suggests).

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

No branches or pull requests

6 participants