* Add phpdoc comments
* Update method signatures to reduce duplication
* Rename some variables to be a bit more clear for new readers
* Try to keep lines <80 chars (my own personal peeve I know)
* Use === instead of ==
* Fix a few other small code style issues
Change-Id: I52594fd34646af53fc91ec470fcf1d0be9c2b156
Change the ConfigRegistry setting in extension.json to the normal
GlobalVarConfig factor rather than a local wrapper.
Change-Id: I9a1b2869ee13fab59f628e4d5c83188a96062c42
Properties listed in $wgTemplateStylesPropertyBlacklist, or
those that contain function-like values not listed in
$wgTemplateStylesFunctionWhitelist cause the containing
declaration to be omitted from rendering entirely.
Additionally, rule selectors are unconditionally prepended
with '#mw-content-text' so that they cannot be applied to
UI elements outside the actual page content.
Change-Id: Id3d7dff465363d0163e4a5a1f31e770b4b0a67e2
Add some comments and tweak the formatting of the test suite. Some
things that were hardcoded can now be tweaked by the
parse->render->verify tests if desired.
Change-Id: I36abc9fa2b9971d6b92d5714c4583dea6ad26b88
Test the roundtrip on a collection of correct and pathological
stylesheets to ascertain whether the parse is behaving as
expected.
Bug: T483
Change-Id: I484cc856b5696c1fa6265769320f79853365e1d6
- add a tweak to the parser (keep the value tokens in a declaration
separate in the parsed tree to ease matching at render time
- add error checking to encoding/decoding the templatestyles property
- pick some lint suggested by Brion and Bryan
Change-Id: If60b91e119102c0f0f559fe7e5a4c421c94b7ff4
This extension adds a <templatestyles> tag that, when placed
on a template, allows specifying CSS for pages where that
template is transcluded.
Unlike inline styles, the per-template CSS supports rules
with proper selectors, and @media blocks.
THIS VERSION DOES NOT CURRENTLY FILTER DECLARATIONS and is
therefore unsuitable for wikis where unprivileged users should
not be allowed to influcence the pagewide CSS in unrestricted
ways!
Bug: T483
Change-Id: Ibc1cae3079d164f7ac7bcc7c4ded3f02bb048614