Skip to content

Commit 42d1da2

Browse files
Copilothotlong
andcommitted
Add Tailwind config to map CSS variables to utilities for component styles
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 8b0301d commit 42d1da2

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

apps/site/tailwind.config.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import type { Config } from 'tailwindcss'
2+
3+
export default {
4+
darkMode: ["class"],
5+
content: [
6+
'./app/**/*.{ts,tsx}',
7+
'./components/**/*.{ts,tsx}',
8+
'./content/**/*.{md,mdx}',
9+
'../../packages/components/src/**/*.{ts,tsx}',
10+
'../../packages/react/src/**/*.{ts,tsx}',
11+
'../../packages/plugin-*/src/**/*.{ts,tsx}',
12+
],
13+
theme: {
14+
extend: {
15+
colors: {
16+
border: "hsl(var(--border))",
17+
input: "hsl(var(--input))",
18+
ring: "hsl(var(--ring))",
19+
background: "hsl(var(--background))",
20+
foreground: "hsl(var(--foreground))",
21+
primary: {
22+
DEFAULT: "hsl(var(--primary))",
23+
foreground: "hsl(var(--primary-foreground))",
24+
},
25+
secondary: {
26+
DEFAULT: "hsl(var(--secondary))",
27+
foreground: "hsl(var(--secondary-foreground))",
28+
},
29+
destructive: {
30+
DEFAULT: "hsl(var(--destructive))",
31+
foreground: "hsl(var(--destructive-foreground))",
32+
},
33+
muted: {
34+
DEFAULT: "hsl(var(--muted))",
35+
foreground: "hsl(var(--muted-foreground))",
36+
},
37+
accent: {
38+
DEFAULT: "hsl(var(--accent))",
39+
foreground: "hsl(var(--accent-foreground))",
40+
},
41+
popover: {
42+
DEFAULT: "hsl(var(--popover))",
43+
foreground: "hsl(var(--popover-foreground))",
44+
},
45+
card: {
46+
DEFAULT: "hsl(var(--card))",
47+
foreground: "hsl(var(--card-foreground))",
48+
},
49+
},
50+
borderRadius: {
51+
lg: "var(--radius)",
52+
md: "calc(var(--radius) - 2px)",
53+
sm: "calc(var(--radius) - 4px)",
54+
},
55+
},
56+
},
57+
} satisfies Config

0 commit comments

Comments
 (0)