ResourceLoaderImageModule for icons
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 11 Nov 2014 19:50:44 +0000 (20:50 +0100)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 9 Dec 2014 19:11:07 +0000 (20:11 +0100)
commitaa00a3e8384a87430f82739507e09bb74c6b40ec
tree6638b25ef4e8be1b2a65cc0a67627de8c1e94a1e
parent84b263583edf2b4e2ec8c5b9cb9218751bc0c2b6
ResourceLoaderImageModule for icons

ResourceLoaderImageModule needs a set of SVG files and some data in
the module definition, and produces styles for a set of CSS classes,
one for each image, optionally with differently colored variants,
generated in SVG and PNG, data-URI-embedded if possible, compatible
with all browsers, and generally slick.

The intended usage is to ship icon libraries with MediaWiki that can
be used throughout the pages with no additional code.

* ResourceLoaderImageModule implements all of the logic for data
  parsing and CSS generation.
* ResourceLoaderImage implements the logic for SVG image colorization
  (for variants) and rasterization.
* ResourceLoader and ResourceLoaderContext were extended to serve a
  new kind of load.php request that delivers a single image file. This
  is used for fallback PNG images served to browsers that don't
  understand SVG.

See change Ic6a76bfb for a demo.

Bug: T76473
Co-Authored-By: Trevor Parscal <trevorparscal@gmail.com>
Co-Authored-By: Bartosz Dziewoński <matma.rex@gmail.com>
Change-Id: Idf6ff4eb8e94f45946f15d283d34108b881fae6e
autoload.php
includes/cache/ResourceFileCache.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderImage.php [new file with mode: 0644]
includes/resourceloader/ResourceLoaderImageModule.php [new file with mode: 0644]