Skip to content

Documentation clarity improvement#43530

Merged
dipikabh merged 4 commits intomdn:mainfrom
sohilsshah:patch-1
Mar 27, 2026
Merged

Documentation clarity improvement#43530
dipikabh merged 4 commits intomdn:mainfrom
sohilsshah:patch-1

Conversation

@sohilsshah
Copy link
Copy Markdown
Contributor

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

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.”
@sohilsshah sohilsshah requested a review from a team as a code owner March 23, 2026 13:43
@sohilsshah sohilsshah requested review from dipikabh and removed request for a team March 23, 2026 13:43
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

Preview URLs (1 page)

Flaws (12)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/At-rules/@container
Title: @container
Flaw count: 12

  • broken_links:
    • Link /en-US/docs/Web/CSS/Reference/Values/block-contents doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/size-feature doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/scroll-state-feature doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/function-token doesn't resolve
    • Link /en-US/docs/Web/CSS/Reference/Values/any-value doesn't resolve
    • and 7 more flaws omitted

(comment last updated: 2026-03-27 13:54:43)

Copy link
Copy Markdown
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

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.

@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Mar 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

sohilsshah and others added 3 commits March 25, 2026 01:43
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
Co-authored-by: Dipika Bhattacharya <dipika@foss-community.org>
@sohilsshah sohilsshah requested a review from dipikabh March 24, 2026 20:46
@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed merge conflicts 🚧 [PR only] size/xs [PR only] 0-5 LoC changed labels Mar 24, 2026
Copy link
Copy Markdown
Contributor

@dipikabh dipikabh left a comment

Choose a reason for hiding this comment

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

Awesome, thank you!

@dipikabh dipikabh merged commit 51872f3 into mdn:main Mar 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants