Documentation clarity improvement#43530
Merged
Conversation
Style declarations are filtered by a condition and applied to the container if the condition is true. The current wording says that styles are “applied to the container if the condition is true,” which seems wrong. From my understanding, container queries evaluate the container’s size or style, but the rules inside @container apply to descendant elements, not the container itself. It might be clearer to rephrase this to something like: “Styles inside the @container rule are applied to elements within the container when the condition is true.”
Contributor
|
Preview URLs (1 page) Flaws (12) Found an unexpected or unresolvable flaw? Please report it here. URL:
(comment last updated: 2026-03-27 13:54:43) |
dipikabh
requested changes
Mar 23, 2026
Contributor
dipikabh
left a comment
There was a problem hiding this comment.
Thanks for sending this PR, @sohilsshah! And welcome to MDN.
I agree with the change. I have a suggestion to improve it further, plus there's one more instance where we can be clearer.
Contributor
|
This pull request has merge conflicts that must be resolved before it can be merged. |
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
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.
Style declarations are filtered by a condition and applied to the container if the condition is true.
The current wording says that styles are “applied to the container if the condition is true,” which seems wrong.
From my understanding, container queries evaluate the container’s size or style, but the rules inside @container apply to descendant elements, not the container itself.
I think it should say "Style declarations are filtered by a condition and applied to the elements if the condition is true."
Description
Motivation
Additional details
Related issues and pull requests