Automattic\WooCommerce\Vendor\Pelago\Emogrifier\Css

CssDocument::hasNestedAtRuleprivateWC 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(строка) (обязательный)
.

Заметки

Код CssDocument::hasNestedAtRule() WC 10.4.3

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