HomePhabricator

Only load gallery styles when needed

Authored by Jdlrobson.

Description

Only load gallery styles when needed

Using http://en.m.wikipedia.beta.wmflabs.org/wiki/Gallery to
test you'll see that with the dependency the mediawiki.page.gallery.styles
module only loads on a page when needed. This minimises the unused css
and css loaded in the head.

Given Ib1aef04dc4fece78e6615386ecaef6a9f368f49e is merged
if we don't merge the change we'll have desktop and
mobile styles on new HTML and just mobile styles on old HTML.

A follow up is needed to remove the cache restrictions.

Bug: T98878
Change-Id: I8dfac9bd81bc1be966a11c77ed7cfe5abd619154