Skip to content

feat: add support for arbitrary CSS function syntax in container queries#1028

Merged
tenphi merged 2 commits intomainfrom
feat-support-modern-container-syntax
Feb 11, 2026
Merged

feat: add support for arbitrary CSS function syntax in container queries#1028
tenphi merged 2 commits intomainfrom
feat-support-modern-container-syntax

Conversation

@tenphi
Copy link
Member

@tenphi tenphi commented Feb 11, 2026

Note

Medium Risk
Touches core state parsing and @container rule generation; regressions could affect container query handling and condition deduplication/combination, though changes are scoped and covered by new tests.

Overview
Enables raw CSS function-like conditions inside @(...) container queries (e.g. @(scroll-state(...)), @(nav, scroll-state(...)), @(style(display: flex))) by parsing them as a new container condition subtype and emitting them verbatim in generated @container rules.

Updates parsing to be parentheses-aware when splitting @(name, condition) (so commas inside function args don’t break parsing), extends condition IDs/caching to include raw conditions, and adds coverage in pipeline/state/output tests plus docs/changeset clarifying that $... style-query shorthand remains the recommended approach for custom properties.

Written by Cursor Bugbot for commit fd5770f. This will update automatically on new commits. Configure here.

- Add 'raw' subtype to ContainerCondition for verbatim CSS passthrough
- Support functions like scroll-state() and style() in @(...) queries
- Fix parentheses-aware comma splitting for functions with inner commas
- Update tokenizer regex to handle nested parentheses in container queries
- Add comprehensive tests for parsing and rendering
- Update documentation with examples and usage notes

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Feb 11, 2026 6:27pm
cube-ui-kit-cursor Ready Ready Preview, Comment Feb 11, 2026 6:27pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: fd5770f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-e56aadb.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

🧪 Storybook is successfully deployed!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

🏋️ Size limit report

Name Size Passed?
All 360.13 KB (+0.04% 🔺) Yes 🎉
Tree shaking (just a Button) 59.11 KB (+0.22% 🔺) Yes 🎉
Tree shaking (just tasty) 34.95 KB (+0.38% 🔺) Yes 🎉

Click here if you want to find out what is changed in this build

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@tenphi tenphi merged commit d3fed9e into main Feb 11, 2026
17 checks passed
@tenphi tenphi deleted the feat-support-modern-container-syntax branch February 11, 2026 19:44
@github-actions github-actions bot mentioned this pull request Feb 11, 2026
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.

1 participant