Skip to content

Conversation

@segunadebayo
Copy link
Member

Closes #3374

📝 Description

Fix issue where using token() or token.var() function from styled-system/tokens doesn't get resolved by the
compiler.

import { token } from 'styled-system/tokens'
import { css } from 'styled-system/css'

css({
  // This didn't work before, but now it does
  outline: `2px solid ${token('colors.gray.500')}`,

  // This has always worked
  outline: `2px solid token('colors.gray.500')`,
})

This also supports fallback values.

css({
  color: token('colors.brand.primary', '#3b82f6'),
})

Please describe the behavior or changes this PR adds

💣 Is this a breaking change (Yes/No): No

📝 Additional Information

@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2025

🦋 Changeset detected

Latest commit: a1c5b82

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

This PR includes changesets to release 20 packages
Name Type
@pandacss/parser Patch
@pandacss/core Patch
@pandacss/token-dictionary Patch
@pandacss/node Patch
@pandacss/astro-plugin-studio Patch
@pandacss/generator Patch
@pandacss/reporter Patch
@pandacss/dev Patch
@pandacss/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

@vercel
Copy link

vercel bot commented Oct 9, 2025

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

Project Deployment Preview Updated (UTC)
panda-docs Ready Ready Preview Oct 9, 2025 5:35pm
panda-playground Ready Ready Preview Oct 9, 2025 5:35pm
panda-studio Ready Ready Preview Oct 9, 2025 5:35pm

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.

token() function not working in monorepo setup

2 participants