diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index 62f7fe65..77af0c81 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -222,7 +222,7 @@ private static function parseAtRule(ParserState $parserState): ?CSSListItem } } $useRuleSet = true; - foreach (\explode('/', AtRule::BLOCK_RULES) as $blockRuleName) { + foreach (AtRule::BLOCK_RULES as $blockRuleName) { if (self::identifierIs($identifier, $blockRuleName)) { $useRuleSet = false; break; diff --git a/src/Property/AtRule.php b/src/Property/AtRule.php index 3ba6236a..808df79f 100644 --- a/src/Property/AtRule.php +++ b/src/Property/AtRule.php @@ -18,8 +18,17 @@ interface AtRule extends CSSListItem * * @internal since 8.5.2 */ - public const BLOCK_RULES = - 'media/document/supports/region-style/font-feature-values/container/layer/scope/starting-style'; + public const BLOCK_RULES = [ + 'media', + 'document', + 'supports', + 'region-style', + 'font-feature-values', + 'container', + 'layer', + 'scope', + 'starting-style', + ]; /** * @return non-empty-string diff --git a/tests/Unit/Property/AtRuleTest.php b/tests/Unit/Property/AtRuleTest.php index 526bb312..85407745 100644 --- a/tests/Unit/Property/AtRuleTest.php +++ b/tests/Unit/Property/AtRuleTest.php @@ -29,7 +29,7 @@ public function blockRulesConstantIsCorrect(): void 'scope', 'starting-style', ], - explode('/', AtRule::BLOCK_RULES) + AtRule::BLOCK_RULES ); } }