Page MenuHomePhabricator

ResourceLoaderImage module css rules should be more configurable
Closed, ResolvedPublic1 Estimated Story Points

Description

In MobileFrontend we are in a transitional state.
We currently use a selector in the form .mw-ui-icon-{name}:before to style an icon.

I switched our icons over to use the module [1] but the implementation is hacky due to names having ':before' in them.
It would be better to provide a neater way to do this so it is easier to move over in future (plus being able to do some kind of css injection like this is probably a concern)
Bartosz suggested replacing prefix with some kind of generic template.

Thoughts?

[1] https://gerrit.wikimedia.org/r/#/c/179005/

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson changed Security from none to None.
Jdlrobson subscribed.
matmarex triaged this task as Medium priority.
matmarex raised the priority of this task from Medium to High.Mar 22 2015, 10:13 PM

Change 199129 had a related patch set uploaded (by Bartosz Dziewoński):
ResourceLoaderImageModule: Implement CSS selector templates

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

Change 199130 had a related patch set uploaded (by Bartosz Dziewoński):
Use ResourceLoaderImageModule's CSS selector templates

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

Change 199131 had a related patch set uploaded (by Bartosz Dziewoński):
Use ResourceLoaderImageModule's CSS selector templates

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

The Gather extension has the same hack.

Change 199129 merged by jenkins-bot:
ResourceLoaderImageModule: Implement CSS selector templates

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

Change 199131 merged by jenkins-bot:
Use ResourceLoaderImageModule's CSS selector templates

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

Change 199130 merged by jenkins-bot:
Use ResourceLoaderImageModule's CSS selector templates

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