Add support for SVGs to $wgLogoHD with PNG fallback
authorPaladox <thomasmulhall410@yahoo.com>
Mon, 22 May 2017 18:12:26 +0000 (19:12 +0100)
committerPaladox <thomasmulhall410@yahoo.com>
Tue, 24 Oct 2017 17:51:28 +0000 (17:51 +0000)
commit66b13d1ba8b4d8c2ca007fd0826dd73fd04c9849
treed8bd6835dba1d0fe698a8ac4ff4b70c4f1cc20d8
parente73b63dd3b977eb3a1606d88f374a47ac0ae102c
Add support for SVGs to $wgLogoHD with PNG fallback

SVGs could already be used through $wgLogo. However, if a PNG fallback
is desired for older browsers, using SVGs was previously not possible.

This commit adds support for using an SVG image in $wgLogoHD and,
using $wgLogo as the fallback image.

Usage example:

> $wgLogo = '/path/to/png';
> $wgLogoHD = [
>     'svg' => 'path/to/svg',
> ];

Note: When the 'svg' key is set in $wgLogoHD, any '1.5x' and '2x' keys will
no longer be used because SVGs can render optimally on any screen sizes.

@Reedy, @Krinkle and @Brion VIBBER helped me alot with this.

Bug: T86229
Change-Id: I6197d96ce9110f4711ef2c4b198445bc5c6ae110
RELEASE-NOTES-1.31
includes/DefaultSettings.php
includes/OutputPage.php
includes/resourceloader/ResourceLoaderSkinModule.php
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderSkinModuleTest.php