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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Please also have a look at our

### Added

- Support for CSS container queries (#1400)

### Changed

### Deprecated
Expand Down
2 changes: 1 addition & 1 deletion src/Property/AtRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface AtRule extends CSSListItem
*
* @internal since 8.5.2
*/
public const BLOCK_RULES = 'media/document/supports/region-style/font-feature-values';
public const BLOCK_RULES = 'media/document/supports/region-style/font-feature-values/container';

/**
* @return non-empty-string
Expand Down
3 changes: 3 additions & 0 deletions tests/CSSList/AtRuleBlockListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public static function provideSyntacticallyCorrectAtRule(): array
}
',
],
'container' => [
'@container (min-width: 60rem) { .items { background: blue; } }',
],
];
}

Expand Down
22 changes: 22 additions & 0 deletions tests/Unit/Property/AtRuleTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

namespace Sabberworm\CSS\Tests\Unit\Property;

use PHPUnit\Framework\TestCase;
use Sabberworm\CSS\Property\AtRule;

final class AtRuleTest extends TestCase
{
/**
* @test
*/
public function blockRulesConstantIsCorrect(): void
{
self::assertEqualsCanonicalizing(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good choice of assert method - it allows the components to be in any order.

['media', 'document', 'supports', 'region-style', 'font-feature-values', 'container'],
explode('/', AtRule::BLOCK_RULES)
);
}
}