Skip to content

Clarify container queries always use content box (fix #40306) #40450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Shrinivassab
Copy link
Contributor

Description

Clarified that all container size queries measure the content box, ignoring box-sizing.

Motivation

Additional details

Related issues and pull requests

Fixes #40306

@Shrinivassab Shrinivassab requested a review from a team as a code owner July 20, 2025 04:02
@Shrinivassab Shrinivassab requested review from estelle and removed request for a team July 20, 2025 04:02
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Jul 20, 2025
Copy link
Contributor

github-actions bot commented Jul 20, 2025

Preview URLs

Flaws (12)

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

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

(comment last updated: 2025-07-27 02:58:56)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

instead of making any of these changes, change line 130 to something like

The `<container-condition>` can include one or more boolean size queries, each within a set of parentheses. A size query includes a size descriptor, a value, and — depending on the descriptor — a comparison operator. The queries always measures the [content box](/en-US/docs/Web/CSS/box-edge#content-box) as the comparison. The syntax for including multiple conditions is the same as for [`@media`](/en-US/docs/Web/CSS/@media) size feature queries.

only use bolding when really necessary. When all cases are the same, favor adding a single note rather than repeating text.

@Shrinivassab
Copy link
Contributor Author

Sure. I revered the changes and added your suggestion.

@github-actions github-actions bot added size/xs [PR only] 0-5 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Jul 27, 2025
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

@estelle estelle merged commit 27e3d27 into mdn:main Jul 27, 2025
8 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/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@container size queries aren't clear about which box size is used
2 participants