mirror of
https://github.com/octfx/mediawiki-extensions-TemplateStylesExtender.git
synced 2024-11-24 00:06:29 +00:00
parent
d5ef84eed3
commit
3e73f15057
|
@ -69,6 +69,7 @@ class StylesheetSanitizerHook {
|
|||
$extended->addAspectRatio( $extender, $matcherFactory );
|
||||
$extended->addInlineBlockMarginPaddingProperties( $extender, $matcherFactory );
|
||||
$extended->addInsetProperties( $extender, $matcherFactory );
|
||||
$extended->addBackdropFilter( $extender );
|
||||
|
||||
$propertySanitizer->setKnownProperties( $extender->getKnownProperties() );
|
||||
}
|
||||
|
|
|
@ -330,6 +330,23 @@ class TemplateStylesExtender {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the backdrop-filter matcher
|
||||
*
|
||||
* @param StylePropertySanitizer $propertySanitizer
|
||||
*/
|
||||
public function addBackdropFilter( StylePropertySanitizer $propertySanitizer ): void {
|
||||
try {
|
||||
$filter = $propertySanitizer->getKnownProperties()['filter'];
|
||||
|
||||
$propertySanitizer->addKnownProperties( [
|
||||
'backdrop-filter' => Quantifier::plus( $filter ),
|
||||
] );
|
||||
} catch ( InvalidArgumentException $e ) {
|
||||
// Fail silently
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a config value for a given key from the main config
|
||||
* Returns null on if an ConfigException was thrown
|
||||
|
|
Loading…
Reference in a new issue