Skip to content

Commit 1adf237

Browse files
committed
Added @layer directive to list of nested directives.
Updated `directive::parse()` to set a new `empty` property, for detecting when a directive has curly brackets, but no content, enabling directives with just properties not to be deleted. Added tests. Updated dependencies.
1 parent e086b07 commit 1adf237

5 files changed

Lines changed: 94 additions & 60 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/vendor/
66
/coverage
77
/.phpunit.cache
8+
/.phpunit.result.cache

composer.lock

Lines changed: 62 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class config {
88
* @var array<array> $config Object configuration array
99
*/
1010
protected array $config = [
11-
'nested' => ['@media', '@supports', '@keyframes', '@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes', '@document', '@-moz-document', '@container'], // directive that can have nested rules
11+
'nested' => ['@media', '@supports', '@keyframes', '@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes', '@document', '@-moz-document', '@container', '@layer'], // directive that can have nested rules
1212
'spaced' => ['calc', 'min', 'max', 'clamp'], // values where spaces between operators must be retained
1313
'quoted' => ['content', 'format', 'counters', '@charset', 'syntax', 'font-feature-settings', '-webkit-font-feature-settings', '-moz-font-feature-settings', 'quotes', 'text-overflow'], // directives or properties where the contained values must be quoted
1414
'casesensitive' => ['url'], // property values that should not be lowercased

0 commit comments

Comments
 (0)