Skip to content
Discussion options

You must be logged in to vote

the way you're referencing your spacing tokens is not "right" from Panda PoV, as the static extractor expects to see the token path instead of the raw CSS variable (that could be defined from anywhere, not specific to Panda)
https://play.panda-css.com/wbu7t3Ypda

const verticalSpacer = cva({
  base: {
    w: 'full',
  },
  variants: {
    size: {
      sm: {
-        h: 'var(--spacing-gap-sm)',
+        h: '{spacing.gap.sm}',
      },
      md: {
-        h: 'var(--spacing-gap-md)',
+        h: '{spacing.gap.md}',
      },
      lg: {
-        h: 'var(--spacing-gap-lg)',
+        h: '{spacing.gap.lg}',
      },
      xl: {
-        h: 'var(--spacing-gap-xl)',
+        h: '{spacing.gap.xl}',

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@cini9
Comment options

@astahmer
Comment options

@cini9
Comment options

Answer selected by cini9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2007 on January 15, 2024 11:45.