From 45830cd87e8ea471b9c4b79883ba48829d9c22e1 Mon Sep 17 00:00:00 2001 From: Simon Chester Date: Wed, 26 Nov 2025 15:31:09 +1300 Subject: [PATCH] [FEATURE] Parse container queries --- CHANGELOG.md | 2 ++ src/Property/AtRule.php | 2 +- tests/CSSList/AtRuleBlockListTest.php | 3 +++ tests/Unit/Property/AtRuleTest.php | 22 ++++++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/Unit/Property/AtRuleTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8978fbb71..1da6a4810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Please also have a look at our ### Added +- Support for CSS container queries (#1400) + ### Changed ### Deprecated diff --git a/src/Property/AtRule.php b/src/Property/AtRule.php index 7a00660f8..f5ae475ea 100644 --- a/src/Property/AtRule.php +++ b/src/Property/AtRule.php @@ -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 diff --git a/tests/CSSList/AtRuleBlockListTest.php b/tests/CSSList/AtRuleBlockListTest.php index 9a725b212..3539463bf 100644 --- a/tests/CSSList/AtRuleBlockListTest.php +++ b/tests/CSSList/AtRuleBlockListTest.php @@ -48,6 +48,9 @@ public static function provideSyntacticallyCorrectAtRule(): array } ', ], + 'container' => [ + '@container (min-width: 60rem) { .items { background: blue; } }', + ], ]; } diff --git a/tests/Unit/Property/AtRuleTest.php b/tests/Unit/Property/AtRuleTest.php new file mode 100644 index 000000000..53793bea8 --- /dev/null +++ b/tests/Unit/Property/AtRuleTest.php @@ -0,0 +1,22 @@ +