Automattic\WooCommerce\EmailEditorVendor\Pelago\Emogrifier\Css

CssDocument::hasNestedAtRule │ private │ WC 1.0

Tests if a string of CSS appears to contain an at-rule with nested rules (@media, @supports, @keyframes, @document, the latter two additionally with vendor prefixes that may commonly be used).

Метод класса: CssDocument{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

// private - только в коде основоного (родительского) класса
$result = $this->hasNestedAtRule( $css ): bool;
$css(строка) (обязательный)
.

Заметки

Смотрите: https://github.com/sabberworm/PHP-CSS-Parser/issues/127

Код CssDocument::hasNestedAtRule() WC 11.3.0

private function hasNestedAtRule(string $css): bool
{
    return (new Preg())
        ->match('/@(?:media|supports|(?:-webkit-|-moz-|-ms-|-o-)?+(keyframes|document))\\b/', $css) !== 0;
}