v3.1.0
What's Changed
Bug Fixes
- prefixIds, correctly prefix IDs when
<style>
tag contains XML comments. By @john-neptune in #1736 - removeHiddenElems, improve handling of definitions (
<defs>
), namely when<defs>
are defined at the end of the document. By @KTibow in #1879 - cleanupEnableBackground, clean up inline-styles too. By @SethFalco in #1866
- cleanupIds, handle URI encoded references properly. By @SethFalco in #1880
- inlineStyles, no longer crashes on non-inlined selectors with a pseudo-class. By @SethFalco in #1865
- Improve handling of URL references in reference attributes (
url('#a')
) across various plugins. By @SethFalco in #1881
SVG Optimization
- removeUnknownsAndDefaults, now removes defaults in XML declarations too, enabled by default and can be toggled with
defaultMarkupDeclarations
. By @SethFalco in #1872
Metrics
Before and after using vectors from various sources, with the default preset of each respective version:
SVG | Original | v3.0.5 | v3.1.0 | Delta |
---|---|---|---|---|
Arch Linux Logo | 9.529 KiB | 4.608 KiB | 4.162 KiB | ⬇️ 0.446 KiB |
Blobs | 50.45 KiB | 42.949 KiB | 42.949 KiB | |
Isometric Madness | 869.034 KiB | 550.153 KiB | 550.153 KiB | |
tldr-pages Banner | 2.071 KiB | 1.07 KiB | 1.07 KiB | |
Wikipedia Logo | 161.551 KiB | 117.146 KiB | 116 KiB | ⬇️ 1.146 KiB |
Before and after of the browser bundle of each respective version:
v3.0.5 | v3.1.0 | Delta | |
---|---|---|---|
svgo.browser.js | 657.5 kB | 660.9 kB | ⬆️ 3.4 kB |