ResourceLoaderImageModule: Implement CSS selector templates
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 23 Mar 2015 21:04:54 +0000 (22:04 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Sun, 29 Mar 2015 17:25:02 +0000 (17:25 +0000)
commit8edbfb5feb708f80d63f118f9b00eb341278f68a
treea22dc5f604ed4f611a36e55dce8b48f4723fe5b8
parent5ed35b04c99abbd7a8d015402f359c7002c491eb
ResourceLoaderImageModule: Implement CSS selector templates

Instead of a 'prefix', a 'selector' can be specified, with a string
containing a simple template to use for CSS selector. For example:

    'selector' => '.mw-ui-icon-{name}'

'prefix' continues to work as before.

When using variants, one might want to provide separate
'selectorWithoutVariant' and 'selectorWithVariant' options.

Available variables are {prefix}, {type}, {name}, and {variant}.

Bug: T78215
Change-Id: I99ccaf25e8d24fed5afd0c4b770d2f389789ce4b
includes/resourceloader/ResourceLoaderImageModule.php
tests/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php