Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add plain vs range syntax section to container queries guide#44014

Merged
hamishwillee merged 7 commits into
mdn:mainfrom
pepelsbey:equality-vs-range
May 22, 2026
Merged

Add plain vs range syntax section to container queries guide#44014
hamishwillee merged 7 commits into
mdn:mainfrom
pepelsbey:equality-vs-range

Conversation

@pepelsbey
Copy link
Copy Markdown
Member

@pepelsbey pepelsbey commented May 5, 2026

Description

Documents the difference between the : (plain) and = (range) forms of style() in container style queries:

  • Adds a new section to the container size and style queries guide.
  • Adds a summary in the @container reference linking to the guide.

Motivation

To clear the difference between style(--n: 3) and style(--n = 3).

Additional details

@pepelsbey pepelsbey requested a review from a team as a code owner May 5, 2026 14:00
@pepelsbey pepelsbey requested review from hamishwillee and removed request for a team May 5, 2026 14:00
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed labels May 5, 2026
@pepelsbey
Copy link
Copy Markdown
Member Author

@nchevobbe let me know if it fully covers the feature

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Preview URLs (2 pages)

Flaws (11)

Note! 1 document with no flaws that don't need to be listed. 🎉

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

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

  • macros:
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/size-feature which doesn't resolve
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/scroll-state-feature which doesn't resolve
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/function-token which doesn't resolve
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/any-value which doesn't resolve
    • Macro csssyntax produces link /en-US/docs/Web/CSS/Reference/Values/any-value which doesn't resolve
    • and 6 more flaws omitted

(comment last updated: 2026-05-22 00:06:29)

@nchevobbe
Copy link
Copy Markdown
Contributor

@nchevobbe let me know if it fully covers the feature

I think so, at least it definitely helps understanding the differences
Maybe @dshin-moz can give it a read too to make sure it's all good :)

@dshin-moz
Copy link
Copy Markdown
Contributor

Yeah, this looks good - Only nitpick is the naming of the equality syntax. At least to me, at a glance, style(--n = 3) looks more like the equality syntax than style(--n: 3).

Technically it's <style-feature-plain> 1, so maybe a "plain match syntax," i.e. style(--n: 3) vs. "range equality syntax," a subset of the <style-range> syntax 2, i.e. style(--n = 3)?

@pepelsbey
Copy link
Copy Markdown
Member Author

@dshin-moz good point! It’s much clearer with plain vs range now and directly attached to the spec. Thanks!

@pepelsbey pepelsbey changed the title Add equality vs range syntax section to container queries guide Add plain vs range syntax section to container queries guide May 6, 2026
Comment thread files/en-us/web/css/reference/at-rules/@container/index.md Outdated
Comment thread files/en-us/web/css/reference/at-rules/@container/index.md
@pepelsbey
Copy link
Copy Markdown
Member Author

@hamishwillee I would wait for @dletorey’s PR to be merged (it’s more time-sensitive) and get back to it then, addressing your feedback, etc.

@hamishwillee
Copy link
Copy Markdown
Collaborator

@hamishwillee I would wait for @dletorey’s PR to be merged (it’s more time-sensitive) and get back to it then, addressing your feedback, etc.

@pepelsbey No, I wouldn't merge that PR until it looks far more like this one. It isn't "minimally viable" whereas this nearly is.

The most efficient way forward is to get this in with minor tweaks, and then Dave could graft his example on top.

@pepelsbey pepelsbey requested a review from hamishwillee May 19, 2026 16:13
@pepelsbey
Copy link
Copy Markdown
Member Author

@hamishwillee thank you for the feedback! I think I addressed most of your concerns. Let me know if it got better.

Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Love it. Thanks.

@hamishwillee hamishwillee merged commit 48afb4d into mdn:main May 22, 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/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants