Optimize SVG icons (#1860)

* Omit XML declaration:
* XML version is 1.0
* encoding is UTF-8
* standalone is no
so it can be omitted.
* Remove unnecessary attributes:
* `xmlns:rdf`, `xmlns:cc`, `xmlns:dc`, `xmlns:xlink` are not used in
these SVG icons.
* No text inside SVG, so `xml:space` is unnecessary.
* `version` attribute will be removed in SVG 2. [Changes from SVG 1.1 —
SVG 2](https://svgwg.org/svg2-draft/changes.html#structure)
* `x` and `y` can be omitted if they are `0`.
* Remove `enable-background` attribute / style property:
* Firefox / Safari does not support `enable-background`.
* It is proposed to be deprecated in SVG 2. [Filter Effects Module Level
1](https://drafts.fxtf.org/filters/#AccessBackgroundImage)
* Remove empty `g` elements.
* Add `width` and `height` attributes in `safari-icon16-off.svg`:
* They are in safari-icon16.svg, simple missing?
This commit is contained in:
asamuzaK (Kazz) 2016-08-07 21:26:04 +09:00 committed by Raymond Hill
parent 458b9758ef
commit 9700c32bc9
6 changed files with 14 additions and 60 deletions

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px">
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="16px" width="16px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#808080"/> <path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#808080"/>
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/> <path style="color:#000000;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/> <path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px">
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="16px" width="16px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#800000"/> <path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#800000"/>
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/> <path style="color:#000000;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/> <path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="24px" width="24px">
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="24px" width="24px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#808080"/> <path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#808080"/>
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/> <path style="color:#000000;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/> <path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="24px" width="24px">
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="24px" width="24px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#800000"/> <path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#800000"/>
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/> <path style="color:#000000;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/> <path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

View File

@ -1,39 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 97.6 97.6">
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <path d="M65.7,30.3c-0.3,6.1-0.1,12.3-0.1,18.4S65.6,61,65.7,67.1c0.1,2.5-0.5,3.8-3.3,4.3c-4.3,0.8-8.7,1.5-13.1,1.5 c-9.5,0-15.1-4.4-16.6-13.8C31,49,32.3,38.7,32,28.4c0-1.6,0.8-1.9,2.2-2c6.5-0.6,6.6-0.5,6.6,6c0,6.8-0.1,13.6,0.1,20.4 c0.2,9.4,3.4,12,12.7,11.3c2.7-0.2,3.3-1.1,3.3-3.6c-0.1-10,0.2-20-0.2-30c-0.1-3.9,1.5-4.2,4.7-4.2C64.4,26.3,65.9,26.7,65.7,30.3z"/>
viewBox="0 0 97.6 97.6" enable-background="new 0 0 97.6 97.6" xml:space="preserve">
<path d="M65.7,30.3c-0.3,6.1-0.1,12.3-0.1,18.4S65.6,61,65.7,67.1c0.1,2.5-0.5,3.8-3.3,4.3c-4.3,0.8-8.7,1.5-13.1,1.5
c-9.5,0-15.1-4.4-16.6-13.8C31,49,32.3,38.7,32,28.4c0-1.6,0.8-1.9,2.2-2c6.5-0.6,6.6-0.5,6.6,6c0,6.8-0.1,13.6,0.1,20.4
c0.2,9.4,3.4,12,12.7,11.3c2.7-0.2,3.3-1.1,3.3-3.6c-0.1-10,0.2-20-0.2-30c-0.1-3.9,1.5-4.2,4.7-4.2C64.4,26.3,65.9,26.7,65.7,30.3z
"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 557 B

View File

@ -1,11 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 16 16">
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <path d="M8,16c-1,0-2,0-3,0c-0.3,0-0.6-0.1-0.8-0.3c-1.3-1.3-2.5-2.6-3.8-3.9C0.1,11.6,0,11.4,0,11C0,9,0,7,0,4.9 c0-0.3,0.1-0.5,0.3-0.7c1.3-1.3,2.6-2.6,3.9-3.9C4.4,0.1,4.6,0,4.9,0C7,0,9,0,11,0c0.3,0,0.5,0.1,0.8,0.3c1.3,1.3,2.6,2.6,3.9,3.9 C15.9,4.4,16,4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,1.4-0.1,2.1-0.2c0.5-0.1,0.5-0.3,0.5-0.7C10.7,10,10.8,9,10.8,8z"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 858 B