Page MenuHomePhabricator

OOjs UI colorized SVG icons are affected by libRSVG bug
Closed, ResolvedPublic

Description

Unfortunately the icons using the style tag element. I strongly suggest to use an inline style notation, either as SVG attribute or inline CSS (it is also a baseless to use globale CSS for a single SVG element). Examples:

T68672 - libRSVG bug (strangely first in 2014)

Additional there are some more (global) style-tag bugs for the libRSVG e.g. https://commons.wikimedia.org/wiki/Help:SVG#Font_styling_class

Event Timeline

matmarex renamed this task from OOjs-UI SVG icons are affected of libRSVG bug to OOjs-UI colorized SVG icons are affected by libRSVG bug.Jan 19 2017, 12:17 PM
matmarex subscribed.

In MediaWiki's code for colorizing icons, we actually use a different method, which works with rsvg: we wrap the entire SVG in a <g fill="whatever"></g> (ResourceLoaderImage::variantize).

That could be adapted into OOjs UI's /build/tasks/colorize-svg.js script.

Volker_E renamed this task from OOjs-UI colorized SVG icons are affected by libRSVG bug to OOjs UI colorized SVG icons are affected by libRSVG bug.Feb 7 2017, 2:50 AM

Change 336424 had a related patch set uploaded (by Bartosz Dziewoński):
colorize-svg: Colorize using a method compatible with rsvg

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

Change 336424 merged by jenkins-bot:
colorize-svg: Colorize using a method compatible with rsvg

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

Volker_E assigned this task to matmarex.
Volker_E moved this task from Backlog to OOjs-UI-0.19.1 on the OOUI board.
Volker_E edited projects, added OOUI (OOjs-UI-0.19.1); removed OOUI.
Volker_E removed a project: Patch-For-Review.