Includes various bug fixes for existing plugins and a new optimization. Also splits removeXMLNS, which removed XLink, into two separate plugins, removeXMLNS and removeXlink.
What's Changed
Default Behavior
Remove XML Namespace, no longer removes the XLink (xmlns:xlink) namespace. If that is desirable, you should enable the new Remove XLink (removeXlink) plugin, which does more while being safer. By @TrySound and @SethFalco in #1535
Bug Fixes
Convert Path Commands, ignore instances where transform applied via style tag. By @SethFalco in #1830
Inline Styles, inline properties with the same specificity in the order that they appear in the stylesheet. By @SethFalco in #1831
Inline Styles, don't remove class or id from node if it's traversed in another CSS selector. By @SethFalco in #1832 and #1836
Convert Path Commands, convert to z command if going back to initial position, or drop z if redundant. By @KTibow in #1822
Inline Styles, when inlining a CSS property that's already declared in a presentation attribute of the node, drop the attribute. By @SethFalco in #1829
Remove XLink, new plugin that removes the XLink (xmlns:xlink) namespace and migrates from XLink attributes to the SVG 2 equivalent. Disabled by default. By @TrySound and @SethFalco in #1535
Metrics
Before and after using vectors from various sources, with the default preset of each respective version:
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu cancel merge
Cancels automatic merging of this PR
@depfu close
Closes this PR and deletes the branch
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ svgo (^2.8.0 → ^3.0.4) · Repo · Changelog
Release Notes
3.0.4
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 15 commits:
docs(removeXlink): add tip to run plugin last (#1840)
docs: add params section to remove xlink docs (#1839)
feat(removeXlink): new plugin to map xlink attrs to svg 2
chore: add contribution guide (#1837)
fix(inlineStyles): dont remove id if traversed in another selector (#1836)
chore: revamp readme (#1835)
test: enable regression test that now passes (#1833)
fix(inlineStyles): dont remove wrapper class if traversed (#1832)
fix(inlineStyles): inline styles in order of priority (#1831)
fix(convertPathData): skip if transform overridden in styles (#1830)
feat(convertPathData): replace with z and remove z when optimal (#1822)
fix: dont trim pre elements (#1796)
feat(inlineStyles): remove redundant presentation attrs (#1829)
ci: use and run tests for node 20 (#1827)
fix: skip keyframes with webkit prefix (#1826)
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands