Add Tremor design tokens for Tailwind v4 compatibility
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m27s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m27s
Tremor v3 expects its TW3 plugin to register tremor-* design tokens (tremor-content, tremor-background, tremor-border, etc.). Since TW4 has no v3 plugin support, define these tokens manually in @theme and safelist the utility classes via @source inline(). This fixes chart axis labels, grid lines, and tooltips rendering without proper colors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,34 @@
|
|||||||
@source inline("hover:{bg,text,border}-{blue,emerald,amber,violet,rose,indigo,sky,fuchsia,lime,orange,cyan,teal,purple,slate,gray,zinc,neutral,stone,red,yellow,green,pink}-{50,100,200,300,400,500,600,700,800,900,950}");
|
@source inline("hover:{bg,text,border}-{blue,emerald,amber,violet,rose,indigo,sky,fuchsia,lime,orange,cyan,teal,purple,slate,gray,zinc,neutral,stone,red,yellow,green,pink}-{50,100,200,300,400,500,600,700,800,900,950}");
|
||||||
@source inline("{border,ring}-{blue,emerald,amber,violet,rose,indigo,sky,fuchsia,lime,orange,cyan,teal,purple,slate,gray,zinc,neutral,stone,red,yellow,green,pink}-{50,100,200,300,400,500,600,700,800,900,950}");
|
@source inline("{border,ring}-{blue,emerald,amber,violet,rose,indigo,sky,fuchsia,lime,orange,cyan,teal,purple,slate,gray,zinc,neutral,stone,red,yellow,green,pink}-{50,100,200,300,400,500,600,700,800,900,950}");
|
||||||
|
|
||||||
|
/* Safelist Tremor design token utility classes */
|
||||||
|
@source inline("{fill,stroke,bg,text,border}-tremor-{brand,background,border,content,content-emphasis,default,label,card,dropdown}");
|
||||||
|
|
||||||
|
/* Tremor design tokens — normally registered by Tremor's TW3 plugin.
|
||||||
|
We define them manually for Tailwind v4 compatibility. */
|
||||||
|
@theme {
|
||||||
|
--color-tremor-brand: var(--color-blue-500);
|
||||||
|
--color-tremor-brand-emphasis: var(--color-blue-700);
|
||||||
|
--color-tremor-brand-inverted: #fff;
|
||||||
|
--color-tremor-brand-muted: var(--color-blue-200);
|
||||||
|
--color-tremor-brand-faint: var(--color-blue-50);
|
||||||
|
--color-tremor-background: #fff;
|
||||||
|
--color-tremor-background-emphasis: var(--color-gray-700);
|
||||||
|
--color-tremor-background-muted: var(--color-gray-50);
|
||||||
|
--color-tremor-background-subtle: var(--color-gray-100);
|
||||||
|
--color-tremor-border: var(--color-gray-200);
|
||||||
|
--color-tremor-content: var(--color-gray-500);
|
||||||
|
--color-tremor-content-emphasis: var(--color-gray-700);
|
||||||
|
--color-tremor-content-strong: var(--color-gray-900);
|
||||||
|
--color-tremor-content-subtle: var(--color-gray-400);
|
||||||
|
--color-tremor-content-inverted: #fff;
|
||||||
|
--color-tremor-ring: var(--color-gray-200);
|
||||||
|
--color-tremor-default: var(--color-gray-500);
|
||||||
|
--color-tremor-label: var(--color-gray-400);
|
||||||
|
--color-tremor-card: #fff;
|
||||||
|
--color-tremor-dropdown: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
/* Theme variables - using CSS custom properties with Tailwind v4 @theme */
|
/* Theme variables - using CSS custom properties with Tailwind v4 @theme */
|
||||||
@theme {
|
@theme {
|
||||||
/* Container */
|
/* Container */
|
||||||
|
|||||||
Reference in New Issue
Block a user