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

Optimize SVG icons #1860

Merged
merged 1 commit into from Aug 7, 2016

Conversation

Projects
None yet
2 participants
@asamuzaK
Copy link
Contributor

asamuzaK commented Aug 5, 2016

  • 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
    • x and y can be omitted if they are 0.
  • Remove enable-background attribute / style property:

  • Remove empty g elements.

  • Add width and height attributes in safari-icon16-off.svg:

    • They are in safari-icon16.svg, simple missing?
Optimize SVG icons
* 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?
@gorhill

This comment has been minimized.

Copy link
Owner

gorhill commented Aug 7, 2016

Thanks.

@asamuzaK asamuzaK deleted the asamuzaK:remove-enable-background branch Aug 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.