Page MenuHomePhabricator

Lacking mixing for SVG only background images
Open, Needs TriagePublic


I was planning on removing some PNG images from extensions that depend on JavaScript, based on the observation by @Volker_E that all browsers that currently get full JavaScript experience seem to also support SVGs. This would reduce maintenance overhead.

There is .background-image-svg but as far as I can see the PNG fallback is mandatory parameter. I request creation of a mixin that adds appropriate prefixes and embedding but doesn't require PNG fallback. The earlier the better, because it will take about a year for my extensions to drop support of currently stable MediaWiki releases, and I would like to minimize the need to ship custom mixins in these extensions.

Alternatively, if you think mixins are no longer needed for this, let's have that documented too.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 2 2017, 8:53 AM

It seems to me that it is now safe to use plain svg as background image when the code relies on JavaScript, and thus mixin is no longer needed. Maybe someone knows if there is some subset of browsers where this could cause issues, such as old Android devices.

The mixin might get more complicated in future somehow, but I can't think how. :-)