Skip to content

Conversation

@thecrypticace
Copy link
Contributor

Fixes #19250

When converting a JS config to a series of theme keys we special case a key of 1, treat it as if it were tuple access, and turn that into nested theme keys.

This isn't 100% correct though because a user can use 1 in an object instead of an array — in which case we should generate normal theme keys with a 1 in the variable name instead of one with a nested theme key separator (--).

Because the conversion works based on key paths we need to treat a path like colors.a.1.b as both --color-a-1-b and --color-a--b. This ensures a utility like text-a-1-b works as expected.

@thecrypticace thecrypticace marked this pull request as ready for review November 4, 2025 16:30
@thecrypticace thecrypticace requested a review from a team as a code owner November 4, 2025 16:30
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.

v4: A theme key of 1 does not work in JS configs

2 participants