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": {
|
"TemplateStylesExtenderEnablePrefersColorScheme": {
|
||||||
"description": "Enable the prefers-color-scheme media query. WARNING this can break things if TemplateStyles was updated upstream",
|
"description": "Enable the prefers-color-scheme media query. WARNING this can break things if TemplateStyles was updated upstream",
|
||||||
"value": true
|
"value": true
|
||||||
|
},
|
||||||
|
"TemplateStylesExtenderEnableCssVars": {
|
||||||
|
"description": "Enable the matcher for css variables",
|
||||||
|
"value": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"MessagesDirs": {
|
"MessagesDirs": {
|
||||||
|
|
|
@ -56,10 +56,15 @@ class StylesheetSanitizerHook {
|
||||||
|
|
||||||
$extender = new StylePropertySanitizerExtender( $matcherFactory );
|
$extender = new StylePropertySanitizerExtender( $matcherFactory );
|
||||||
|
|
||||||
$extended->addVarSelector( $propertySanitizer, $matcherFactory );
|
if ( TemplateStylesExtender::getConfigValue(
|
||||||
|
'TemplateStylesExtenderEnableCssVars',
|
||||||
|
true ) === true ) {
|
||||||
|
$extended->addVarSelector( $propertySanitizer, $matcherFactory );
|
||||||
|
}
|
||||||
|
|
||||||
$extended->addImageRendering( $extender );
|
$extended->addImageRendering( $extender );
|
||||||
$extended->addRuby( $extender );
|
$extended->addRuby( $extender );
|
||||||
|
$extended->addPointerEvents( $extender );
|
||||||
$extended->addScrollMarginProperties( $extender, $matcherFactory );
|
$extended->addScrollMarginProperties( $extender, $matcherFactory );
|
||||||
|
|
||||||
$propertySanitizer->setKnownProperties( $extender->getKnownProperties() );
|
$propertySanitizer->setKnownProperties( $extender->getKnownProperties() );
|
||||||
|
|
Loading…
Reference in a new issue