mirror of
https://github.com/octfx/mediawiki-extensions-TemplateStylesExtender.git
synced 2024-12-11 16:16:20 +00:00
feat: Allow to disable the var matcher
This commit is contained in:
parent
ec064f083e
commit
e286af5b2d
|
@ -21,6 +21,10 @@
|
|||
"TemplateStylesExtenderEnablePrefersColorScheme": {
|
||||
"description": "Enable the prefers-color-scheme media query. WARNING this can break things if TemplateStyles was updated upstream",
|
||||
"value": true
|
||||
},
|
||||
"TemplateStylesExtenderEnableCssVars": {
|
||||
"description": "Enable the matcher for css variables",
|
||||
"value": true
|
||||
}
|
||||
},
|
||||
"MessagesDirs": {
|
||||
|
|
|
@ -56,10 +56,15 @@ class StylesheetSanitizerHook {
|
|||
|
||||
$extender = new StylePropertySanitizerExtender( $matcherFactory );
|
||||
|
||||
if ( TemplateStylesExtender::getConfigValue(
|
||||
'TemplateStylesExtenderEnableCssVars',
|
||||
true ) === true ) {
|
||||
$extended->addVarSelector( $propertySanitizer, $matcherFactory );
|
||||
}
|
||||
|
||||
$extended->addImageRendering( $extender );
|
||||
$extended->addRuby( $extender );
|
||||
$extended->addPointerEvents( $extender );
|
||||
$extended->addScrollMarginProperties( $extender, $matcherFactory );
|
||||
|
||||
$propertySanitizer->setKnownProperties( $extender->getKnownProperties() );
|
||||
|
|
Loading…
Reference in a new issue