Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CSSList/CSSList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 11 additions & 2 deletions src/Property/AtRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Property/AtRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function blockRulesConstantIsCorrect(): void
'scope',
'starting-style',
],
explode('/', AtRule::BLOCK_RULES)
AtRule::BLOCK_RULES
);
}
}