Automattic\WooCommerce\Vendor\Pelago\Emogrifier\Css
CssDocument::hasNestedAtRule
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).
Method of the class: CssDocument{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->hasNestedAtRule( $css ): bool;
- $css(string) (required)
- .
Notes
CssDocument::hasNestedAtRule() CssDocument::hasNestedAtRule code WC 10.5.0
private function hasNestedAtRule(string $css): bool
{
return (new Preg())
->match('/@(?:media|supports|(?:-webkit-|-moz-|-ms-|-o-)?+(keyframes|document))\\b/', $css) !== 0;
}