Skip to content

[css-conditional-5] Make <container-query> optional #9192#11172

Merged
lilles merged 1 commit intow3c:mainfrom
lilles:rune/optional-query-20241108
Nov 11, 2024
Merged

[css-conditional-5] Make <container-query> optional #9192#11172
lilles merged 1 commit intow3c:mainfrom
lilles:rune/optional-query-20241108

Conversation

@lilles
Copy link
Copy Markdown
Member

@lilles lilles commented Nov 8, 2024

Resolution:

#9192 (comment)

@lilles lilles requested a review from dbaron November 8, 2024 15:20
Copy link
Copy Markdown
Contributor

@svgeesus svgeesus left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lilles lilles merged commit e4e057c into w3c:main Nov 11, 2024
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2024
Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 11, 2024
Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2024
Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 11, 2024
Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 13, 2024
…ainer-name only, a=testonly

Automatic update from web-platform-tests
[@container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Nov 15, 2024
…ainer-name only, a=testonly

Automatic update from web-platform-tests
[@container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 16, 2024
…iner-name only, a=testonly

Automatic update from web-platform-tests
[container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futharkchromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org>
Cr-Commit-Position: refs/heads/main{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093

UltraBlame original commit: 7b8ebb588e4a42607f3e63ce4a765566c03b09d7
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 16, 2024
…iner-name only, a=testonly

Automatic update from web-platform-tests
[container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futharkchromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org>
Cr-Commit-Position: refs/heads/main{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093

UltraBlame original commit: 7b8ebb588e4a42607f3e63ce4a765566c03b09d7
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 16, 2024
…iner-name only, a=testonly

Automatic update from web-platform-tests
[container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futharkchromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruudchromium.org>
Cr-Commit-Position: refs/heads/main{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093

UltraBlame original commit: 7b8ebb588e4a42607f3e63ce4a765566c03b09d7
jwidar pushed a commit to jwidar/LatencyZeroGithub that referenced this pull request Sep 16, 2025
…ainer-name only, a=testonly

Automatic update from web-platform-tests
[@container] Add tests for querying container-name only

Spec PR: w3c/csswg-drafts#11172

Bug: 40287550

Change-Id: Ibf930266cc78738c69e7629473a60cb9c5d67a57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6003155
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1381100}

--

wpt-commits: 19c1622ff25b7ac8e013e57ea6febdf43d20dbc1
wpt-pr: 49093
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 5, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 5, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}
ajperel pushed a commit to chromium/chromium that referenced this pull request Jan 5, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 5, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 5, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}
lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jan 8, 2026
…ind a flag, a=testonly

Automatic update from web-platform-tests
Support name-only @container queries behind a flag

This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}

--

wpt-commits: 6d8b0a1471af0cfd5f86906038a55c77da76dd91
wpt-pr: 56982
yisibl added a commit to yisibl/lightningcss that referenced this pull request Jan 9, 2026
In the CSS specification, `<container-query>` is now optional.

Old: `[ <container-name> ]? <container-query>`
New:`[ <container-name>? <container-query>? ]!`

This means that previously, to determine whether an element had container queries enabled,
we had to write it like this:

```css
@container foo (width >= 0) {
  .inner {
    color: green
  }
}
```

It can now be simplified to:

```css
@container foo {
  .inner {
    color: green
  }
}
```

- Spec: w3c/csswg-drafts#11172
- Chrome implemented in: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
- Safari implemented in: https://bugs.webkit.org/show_bug.cgi?id=302433

----

This PR also improves error messages; `@container foo () {}` now provides specific syntax error reasons:

```
The brackets cannot be empty
```
yisibl added a commit to yisibl/lightningcss that referenced this pull request Jan 9, 2026
In the CSS specification, `<container-query>` is now optional.

Old: `[ <container-name> ]? <container-query>`
New:`[ <container-name>? <container-query>? ]!`

This means that previously, to determine whether an element had container queries enabled,
we had to write it like this:

```css
@container foo (width >= 0) {
  .inner {
    color: green
  }
}
```

It can now be simplified to:

```css
@container foo {
  .inner {
    color: green
  }
}
```

- Spec: w3c/csswg-drafts#11172
- Chrome implemented in: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
- Safari implemented in: https://bugs.webkit.org/show_bug.cgi?id=302433

----

This PR also improves error messages; `@container foo () {}` now provides specific syntax error reasons:

```
The brackets cannot be empty
```
devongovett pushed a commit to parcel-bundler/lightningcss that referenced this pull request Jan 20, 2026
In the CSS specification, `<container-query>` is now optional.

Old: `[ <container-name> ]? <container-query>`
New:`[ <container-name>? <container-query>? ]!`

This means that previously, to determine whether an element had container queries enabled,
we had to write it like this:

```css
@container foo (width >= 0) {
  .inner {
    color: green
  }
}
```

It can now be simplified to:

```css
@container foo {
  .inner {
    color: green
  }
}
```

- Spec: w3c/csswg-drafts#11172
- Chrome implemented in: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
- Safari implemented in: https://bugs.webkit.org/show_bug.cgi?id=302433

----

This PR also improves error messages; `@container foo () {}` now provides specific syntax error reasons:

```
The brackets cannot be empty
```
KurtCattiSchmidt pushed a commit to KurtCattiSchmidt/wpt-ahem that referenced this pull request Jan 21, 2026
This is per spec change:

w3c/csswg-drafts#11172

Removed expectations txt files for font-relative-units-dynamic.html
because it is already marked flaky in TestExpectations.

Bug: 40287550
Change-Id: I068b96fe2c3752e731ab8b6bd8adb0ed6918594a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7378819
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1564277}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants