Add tests for container queries with name-only syntax#204
Merged
bartveneman merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
…ons)
Container conditions are now optional per the updated CSS spec. This adds
test coverage proving that `@container sidebar { }` and similar patterns
with only a container name (no condition block) parse correctly.
See https://bugzilla.mozilla.org/show_bug.cgi?id=2016474
https://claude.ai/code/session_01Ta7yWNuyFFE523YPGg46F7
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=======================================
Coverage 95.24% 95.24%
=======================================
Files 16 16
Lines 2881 2881
Branches 806 806
=======================================
Hits 2744 2744
Misses 137 137 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added test coverage for parsing CSS container queries that specify only a container name without conditions, which is valid according to the CSS Containment specification.
Changes
@container sidebar)@container my-layout)Details
These tests validate that the parser correctly handles the optional container conditions syntax. According to the CSS spec (referenced in the test comments), container conditions are optional when a container name is specified. The tests ensure that:
https://claude.ai/code/session_01Ta7yWNuyFFE523YPGg46F7