Page MenuHomePhabricator

Consider svgo use (via cssnano)
Closed, ResolvedPublic

Description

To further decrease the size of our assets

Event Timeline

Fyi, Foundation has settled over last 1.5+ years on a certain subset of SVGO rules, that provided fail-safe optimization for existing SVGs in core and products.

Change 589075 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: update Wikimedia UI and OOUI

https://gerrit.wikimedia.org/r/589075

Change 589075 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: update WikimediaUI Base and OOUI

https://gerrit.wikimedia.org/r/589075

With the above change, whitespace is now removed in the icons we inherit from OOUI:

-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
-    <title>
-        close
-    </title>
-    <path d="M4.34 2.93l12.73 12.73-1.41 1.41L2.93 4.35z"/>
-    <path d="M17.07 4.34L4.34 17.07l-1.41-1.41L15.66 2.93z"/>
-</svg>
+<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><title>close</title><path d="M4.34 2.93l12.73 12.73-1.41 1.41L2.93 4.35z"/><path d="M17.07 4.34L4.34 17.07l-1.41-1.41L15.66 2.93z"/></svg>

Those icons are also SVGOed already upstream, so I’m not sure if there’s much else to do here.

@Lucas_Werkmeister_WMDE The icons in OOUI dist are highly-optimized with manual steps and multiple SVGO passes and are good to go.

Lucas_Werkmeister_WMDE claimed this task.

Then I think we can just close this, we don’t have any icons of our own at this time.