Automattic\WooCommerce\Vendor\Pelago\Emogrifier
CssInliner::replaceUnmatchableNotComponent
Helps removeUnmatchablePseudoComponents() replace or remove a selector :not(...) component if its argument contains pseudo-elements or dynamic pseudo-classes.
Метод класса: CssInliner{}
Хуков нет.
Возвращает
Строку . the full match if there were no unmatchable pseudo components within; otherwise, any preceding combinator followed by "*", or an empty string if there was no preceding combinator
Использование
// private - только в коде основоного (родительского) класса $result = $this->replaceUnmatchableNotComponent( $matches ): string;
- $matches(массив) (обязательный)
- .
Код CssInliner::replaceUnmatchableNotComponent() CssInliner::replaceUnmatchableNotComponent WC 10.4.3
private function replaceUnmatchableNotComponent(array $matches): string
{
[$notComponentWithAnyPrecedingCombinator, $anyPrecedingCombinator, $notArgumentInBrackets] = $matches;
if ($this->hasUnsupportedPseudoClass($notArgumentInBrackets)) {
return $anyPrecedingCombinator !== '' ? $anyPrecedingCombinator . '*' : '';
}
return $notComponentWithAnyPrecedingCombinator;
}