The Figma to shadcn/ui plugin exports the **ENTIRE @theme inline block** with **circular CSS variable references**, which breaks Tailwind CSS v4 functionality. While breakpoints are the most visible issue (breaking all responsive utilities), this affects colors, typography, spacing, shadows, and all other theme values.
#19570
Unanswered
amacodehouse
asked this question in
Help
Replies: 1 comment
-
|
This looks like a plugin export bug, not a Tailwind bug. Self-references like: --breakpoint-lg: var(--breakpoint-lg);give Tailwind no real value at build time, so responsive utilities can break. It should export actual values instead: --breakpoint-lg: 64rem;So yes... valid issue with the Figma plugin output. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current Behavior (Broken)
What figma shadcn/ui plugin exports
@theme inline { // ❌ ALL 151 variables have circular references! --color-background: var(--background); --color-foreground: var(--foreground); --color-primary: var(--primary); --color-secondary: var(--secondary); --font-sans: var(--font-sans); --font-serif: var(--font-serif); --radius-sm: var(--radius-sm); --radius-md: var(--radius-md); --text-base: var(--text-base); --text-lg: var(--text-lg); --breakpoint-sm: var(--breakpoint-sm); --breakpoint-md: var(--breakpoint-md); --breakpoint-lg: var(--breakpoint-lg); --breakpoint-xl: var(--breakpoint-xl); --container-sm: var(--container-sm); --container-lg: var(--container-lg); --shadow-sm: var(--shadow-sm); --shadow-lg: var(--shadow-lg); --blur-sm: var(--blur-sm); // ... and 131 more variables, ALL with var() circular references } :root { // ✅ Actual values defined here --primary: oklch(54.9% 0.213 259.907deg); --background: oklch(100% 0 0deg); --font-sans: plus jakarta sans, sans-serif; --radius-sm: 0.375rem; --text-base: 1rem; --breakpoint-sm: 40rem; --breakpoint-lg: 64rem; --container-sm: 24rem; --shadow-sm: 0 1px 3px 0 oklch(0% 0 0deg / 10%); --blur-sm: 8px; // ... and 131 more with actual values }Problem
The ENTIRE
@theme inlineblock (151 variables) uses circular references: each variable references itself viavar(), which Tailwind CSS v4 cannot resolve at build time.Scope of circular references:
--color-primary: var(--primary)--text-lg: var(--text-lg),--font-sans: var(--font-sans)--breakpoint-lg: var(--breakpoint-lg)--container-lg: var(--container-lg)--radius-sm: var(--radius-sm)--shadow-lg: var(--shadow-lg)--blur-sm: var(--blur-sm)--font-weight-bold: var(--font-weight-bold)--primary-brandPrimary: var(--primary-brandPrimary)What Tailwind Generates
When Tailwind processes the circular reference, it generates invalid CSS:
Beta Was this translation helpful? Give feedback.
All reactions