Repository navigation
Conversation
--fooBar was emitted as --foo-bar while var(--fooBar) stayed, so camelCase vars never matched. null values were silently dropped. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- initial value typed by syntax, checked at runtime - throw on invalid names, unknown data types, var() initial values - register: false no longer accepts an initial value Co-authored-by: Cursor <cursoragent@cursor.com>
- names are the path joined with -, no kebab-casing - token() values typed and checked by syntax, also in createTheme - throw on conflicting defaults across defineTokens calls Co-authored-by: Cursor <cursoragent@cursor.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
surimi | c1ec5c0 | Commit Preview URL Branch Preview URL |
Oct 04 2026, 05:42 PM |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Syntax validation gaps and non-transactional token registration can accept invalid values or leave state behind after failed calls.
Review effort: Balanced
Findings: 6
Open (6)
Add missing viewport units to type-level length validation · New Model integer syntax separately from general numeric values · New Accept all prefixed viewport min/max units at runtime · New Validate every item in multiplied syntax lists · New Validate math-function operands instead of trusting wrapper names · New Prevent failed default conflicts from mutating generated state · New
What changed in this PR
Unifies custom property and theme token behavior, adding syntax-aware typing, runtime validation, preserved naming, and consistent reuse across builders.
Changes:
- Adds typed custom-property syntax validation and token/theme propagation.
- Preserves custom-property casing and detects conflicting token defaults.
- Extends conditional selectors with reusable
use()support.
| File | Description |
|---|---|
packages/theme/test/theme.spec.ts |
Tests naming, conflicts, and typed tokens. |
packages/theme/src/types.ts |
Propagates token value types. |
packages/theme/src/token.ts |
Types token definitions by syntax. |
packages/theme/src/define-tokens.ts |
Preserves names and detects default conflicts. |
packages/surimi/test/utils/css.utils.spec.ts |
Tests custom-property casing and null handling. |
packages/surimi/test/builders/custom-property-builder.spec.ts |
Tests registration and syntax validation. |
packages/surimi/src/api.ts |
Adds syntax-aware property API types. |
packages/docs/src/pages/docs/guides/theme.mdx |
Documents updated token behavior. |
packages/core/src/utils/css.utils.ts |
Preserves custom-property names and rejects nulls. |
packages/core/src/builders/index.ts |
Exports styling mixins. |
packages/core/src/builders/custom-property.builder.ts |
Implements validation and registration deduplication. |
packages/conditional/test/conditional.spec.ts |
Tests conditional use(). |
packages/conditional/src/api.ts |
Adopts reusable styling support. |
packages/common/src/types/syntax.types.ts |
Defines syntax-to-value mappings. |
packages/common/src/types/index.ts |
Exports syntax types. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- remove syntax parsing and SyntaxValue types, CSS errors are left to the browser - defineTokens validates everything before emitting
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes a set of different custom property / theme issues:
camelCase vars never matched. null values were silently dropped.