Skip to content

feat: add @supports at-rule support in the Styles pane - #131

Merged
Dango-2021 merged 1 commit into
lynx-family:mainfrom
shangguan2024:feat/css-supports-styles-pane
Jul 14, 2026
Merged

feat: add @supports at-rule support in the Styles pane#131
Dango-2021 merged 1 commit into
lynx-family:mainfrom
shangguan2024:feat/css-supports-styles-pane

Conversation

@shangguan2024

Copy link
Copy Markdown
Contributor

Summary

Display @supports CSS at-rules in the Elements Styles sidebar, mirroring the existing @media and @container query handling.

Ported from ChromeDevTools/devtools-frontend@5c17e46.

Changes

  • SDK: add CSSSupports model extending CSSQuery; parse the supports payload on CSSStyleRule and rebase it on edits; export via sdk.ts and register in BUILD.gn / devtools_grd_files.gni.
  • Panel: render @supports queries in StylesSidebarPane via new createSupportsList / createAtRuleLists; generalize query-click/edit handlers to SDK.CSSQuery.CSSQuery.
  • Protocol: add the CSSSupports type and CSSRule.supports field to the CDP definitions (browser_protocol.pdl / .json and generated protocol.d.ts).
  • Tests: add an e2e test in style-pane-properties_test.ts and a css-supports.html fixture.

Testing

  • e2e: The Styles pane > can display @supports at-rules asserts the @supports (width: 10px) query renders in the styles section.

Display @supports CSS at-rules in the Elements Styles sidebar, mirroring the
existing @media and @container query handling.

- Add CSSSupports SDK model extending CSSQuery
- Parse the supports payload on CSSStyleRule and rebase on edits
- Render @supports queries via createSupportsList / createAtRuleLists
- Add CSSSupports type and CSSRule.supports field to the CDP protocol
  definitions (.pdl / .json / generated protocol.d.ts)
- Add an e2e test and css-supports.html fixture

Ported from ChromeDevTools/devtools-frontend@5c17e46.
@shangguan2024
shangguan2024 force-pushed the feat/css-supports-styles-pane branch from 02e23e9 to 18ec439 Compare July 11, 2026 18:54
@Dango-2021
Dango-2021 added this pull request to the merge queue Jul 14, 2026
Merged via the queue into lynx-family:main with commit 16a6e7c Jul 14, 2026
2 checks passed
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.

3 participants