Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow nesting string token ref / fix CSS var in string token ref fallback #2615

Merged
merged 2 commits into from
May 21, 2024

Conversation

astahmer
Copy link
Collaborator

@astahmer astahmer commented May 20, 2024

πŸ“ Description

Allow nesting (string) token references in the fallback argument, fix an issue where using CSS var in the fallback argument would be mistakenly escaped

⛳️ Current behavior (updates)

css({ color: "token(colors.red.300, token(colors.blue.500, yellow))" )}
// ❌ -> "var(--colors-red-300, token\\(colors\\.blue\\.500))"

css({ color: "token(colors.red.300, var(--some-var, var(--another-var, purple)))" )}
// ❌ -> "var(--colors-red-300, var\\(--some-var)))"

πŸš€ New behavior

css({ color: "token(colors.red.300, token(colors.blue.500, yellow))" )}
// βœ… -> "var(--colors-red-300, var(--colors-blue-500, yellow))"

css({ color: "token(colors.red.300, var(--some-var, var(--another-var, purple)))" )}
// βœ… -> "var(--colors-red-300, var(--some-var, var(--another-var, purple)))"

πŸ’£ Is this a breaking change (Yes/No):

no

Copy link

vercel bot commented May 20, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
panda-docs βœ… Ready (Inspect) Visit Preview May 20, 2024 7:47pm
panda-playground βœ… Ready (Inspect) Visit Preview May 20, 2024 7:47pm
panda-studio βœ… Ready (Inspect) Visit Preview May 20, 2024 7:47pm

Copy link

changeset-bot bot commented May 20, 2024

πŸ¦‹ Changeset detected

Latest commit: 91c1750

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

This PR includes changesets to release 19 packages
Name Type
@pandacss/token-dictionary Patch
@pandacss/parser Patch
@pandacss/core Patch
@pandacss/dev Patch
@pandacss/generator Patch
@pandacss/node Patch
@pandacss/studio Patch
@pandacss/astro-plugin-studio Patch
@pandacss/postcss Patch
@pandacss/config Patch
@pandacss/extractor Patch
@pandacss/is-valid-prop Patch
@pandacss/logger Patch
@pandacss/preset-atlaskit Patch
@pandacss/preset-base Patch
@pandacss/preset-open-props Patch
@pandacss/preset-panda Patch
@pandacss/shared Patch
@pandacss/types Patch

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

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.

None yet

2 participants