HomePhabricator

ResourceLoaderImageModule: Implement CSS selector templates

Authored by matmarex.

Description

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

Details

Committed
matmarexMar 29 2015, 5:25 PM
Parents
rMW5ed35b04c99a: ResourceLoaderImageModule: Add basic tests
Branches
Unknown
Tags
Unknown
References
refs/changes/29/199129/5
ChangeId
I99ccaf25e8d24fed5afd0c4b770d2f389789ce4b