Skip to content

Commit

Permalink
Added @layer directive to list of nested directives.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hexydec committed Dec 18, 2023
1 parent e086b07 commit 1adf237
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/vendor/
/coverage
/.phpunit.cache
/.phpunit.result.cache
119 changes: 62 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class config {
* @var array<array> $config Object configuration array
*/
protected array $config = [
'nested' => ['@media', '@supports', '@keyframes', '@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes', '@document', '@-moz-document', '@container'], // directive that can have nested rules
'nested' => ['@media', '@supports', '@keyframes', '@-webkit-keyframes', '@-moz-keyframes', '@-o-keyframes', '@document', '@-moz-document', '@container', '@layer'], // directive that can have nested rules
'spaced' => ['calc', 'min', 'max', 'clamp'], // values where spaces between operators must be retained
'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
'casesensitive' => ['url'], // property values that should not be lowercased
Expand Down

0 comments on commit 1adf237

Please sign in to comment.