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

Improve SVG compression #46

Closed
wants to merge 1 commit into from
Closed

Improve SVG compression #46

wants to merge 1 commit into from

Conversation

XhmikosR
Copy link

@XhmikosR XhmikosR commented Sep 13, 2020

Removed the unneeded version attribute and reran SVGs through the latest SVGO.

Do note that this also includes #45, so CC me if a rebase is needed. Also, better compare without whitespace.

Removed the unneeded `version` attribute and reran SVGs through the latest SVGO.
);
}

if ( isset( $icons[ $icon ] ) ) {
return sprintf( '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="1em" viewBox="0 0 448 448">%s</svg>', $icons[ $icon ] );
return sprintf( '<svg xmlns="http://www.w3.org/2000/svg" width="1em" viewBox="0 0 448 448">%s</svg>', $icons[ $icon ] );
Copy link
Author

Choose a reason for hiding this comment

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

Arguably, this should include a height attribute too. IE for example is known not to work properly without dimensions.

@XhmikosR XhmikosR closed this Oct 3, 2021
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.

None yet

1 participant