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

Flatten SVG transforms #865

Merged
merged 1 commit into from
Oct 31, 2022
Merged

Flatten SVG transforms #865

merged 1 commit into from
Oct 31, 2022

Conversation

tillprochaska
Copy link
Contributor

@tillprochaska tillprochaska commented Oct 26, 2022

Most of the raw SVG files have translations applied to groups of paths. During the build process, only paths are extracted. As a result, many icons are misaligned:

Screen Shot 2022-10-27 at 00 09 00 Screen Shot 2022-10-27 at 00 08 47 Screen Shot 2022-10-27 at 00 18 20

Unfortunately, svgo doesn't support flattening transforms yet, so I’ve done this manually.

Before After
Screen Shot 2022-10-26 at 22 40 06 Screen Shot 2022-10-26 at 23 24 04

To do:

  •  Verify that all icons still look good

Most of the raw SVG files have translations applied to groups of paths. During the build process, only paths are extracted. As a result, many icons are misaligned. Unfortunately, svgo [doesn't support flattening transforms](svg/svgo#624) yet, so I’ve done this manually.
@tillprochaska tillprochaska marked this pull request as ready for review October 27, 2022 09:46
Copy link
Contributor

@pudo pudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I guess the source of the icons has always been a bit of a mystery, so no worsening there :)

@tillprochaska
Copy link
Contributor Author

Just for future reference: I've used https://lean-svg.netlify.app/ to flatten the transforms.

@pudo
Copy link
Contributor

pudo commented Oct 31, 2022

oh that's a very useful link! thanks!

@pudo pudo merged commit 7a7153f into master Oct 31, 2022
@pudo pudo deleted the till/fix-icon-alignment branch October 31, 2022 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants