-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathtailwind.config.cjs
More file actions
225 lines (225 loc) · 7.95 KB
/
tailwind.config.cjs
File metadata and controls
225 lines (225 loc) · 7.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/renderer/**/*.{js,ts,jsx,tsx,html}',
],
theme: {
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
// Halo brand colors
'halo-glow': 'hsl(var(--halo-glow))',
'halo-success': 'hsl(var(--halo-success))',
'halo-warning': 'hsl(var(--halo-warning))',
'halo-error': 'hsl(var(--halo-error))',
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
// GitHub-like typography customization
typography: ({ theme }) => ({
DEFAULT: {
css: {
'--tw-prose-body': 'hsl(var(--foreground))',
'--tw-prose-headings': 'hsl(var(--foreground))',
'--tw-prose-lead': 'hsl(var(--muted-foreground))',
'--tw-prose-links': 'hsl(var(--primary))',
'--tw-prose-bold': 'hsl(var(--foreground))',
'--tw-prose-counters': 'hsl(var(--muted-foreground))',
'--tw-prose-bullets': 'hsl(var(--muted-foreground))',
'--tw-prose-hr': 'hsl(var(--border))',
'--tw-prose-quotes': 'hsl(var(--foreground))',
'--tw-prose-quote-borders': 'hsl(var(--border))',
'--tw-prose-captions': 'hsl(var(--muted-foreground))',
'--tw-prose-code': 'hsl(var(--foreground))',
'--tw-prose-pre-code': 'hsl(var(--foreground))',
'--tw-prose-pre-bg': 'hsl(var(--secondary))',
'--tw-prose-th-borders': 'hsl(var(--border))',
'--tw-prose-td-borders': 'hsl(var(--border))',
// Invert colors (for dark mode)
'--tw-prose-invert-body': 'hsl(var(--foreground))',
'--tw-prose-invert-headings': 'hsl(var(--foreground))',
'--tw-prose-invert-lead': 'hsl(var(--muted-foreground))',
'--tw-prose-invert-links': 'hsl(var(--primary))',
'--tw-prose-invert-bold': 'hsl(var(--foreground))',
'--tw-prose-invert-counters': 'hsl(var(--muted-foreground))',
'--tw-prose-invert-bullets': 'hsl(var(--muted-foreground))',
'--tw-prose-invert-hr': 'hsl(var(--border))',
'--tw-prose-invert-quotes': 'hsl(var(--foreground))',
'--tw-prose-invert-quote-borders': 'hsl(var(--border))',
'--tw-prose-invert-captions': 'hsl(var(--muted-foreground))',
'--tw-prose-invert-code': 'hsl(var(--foreground))',
'--tw-prose-invert-pre-code': 'hsl(var(--foreground))',
'--tw-prose-invert-pre-bg': 'hsl(var(--secondary))',
'--tw-prose-invert-th-borders': 'hsl(var(--border))',
'--tw-prose-invert-td-borders': 'hsl(var(--border))',
// GitHub-like spacing and sizing
maxWidth: 'none',
lineHeight: '1.7',
// Headings - GitHub style with border-bottom for h1/h2
h1: {
fontSize: '2em',
fontWeight: '600',
marginTop: '1.5em',
marginBottom: '1em',
paddingBottom: '0.3em',
borderBottom: '1px solid hsl(var(--border))',
},
h2: {
fontSize: '1.5em',
fontWeight: '600',
marginTop: '1.5em',
marginBottom: '0.75em',
paddingBottom: '0.3em',
borderBottom: '1px solid hsl(var(--border))',
},
h3: {
fontSize: '1.25em',
fontWeight: '600',
marginTop: '1.5em',
marginBottom: '0.5em',
},
h4: {
fontSize: '1em',
fontWeight: '600',
marginTop: '1.5em',
marginBottom: '0.5em',
},
// Paragraphs
p: {
marginTop: '0',
marginBottom: '1em',
},
// Links - base styles (component adds target="_blank")
a: {
color: 'hsl(var(--primary))',
textDecoration: 'none',
'&:hover': {
textDecoration: 'underline',
},
},
// Inline code only (code blocks handled by component with not-prose)
':not(pre) > code': {
backgroundColor: 'hsl(var(--muted))',
padding: '0.2em 0.4em',
borderRadius: '6px',
fontSize: '85%',
fontWeight: '400',
'&::before': { content: 'none' },
'&::after': { content: 'none' },
},
// Code blocks - base styles (component wraps with not-prose for CopyButton)
pre: {
backgroundColor: 'hsl(var(--muted) / 0.5)',
borderRadius: '6px',
padding: '1em',
overflow: 'auto',
fontSize: '85%',
lineHeight: '1.45',
},
'pre code': {
backgroundColor: 'transparent',
padding: '0',
borderRadius: '0',
fontSize: 'inherit',
},
// Blockquotes - GitHub style with left border
blockquote: {
borderLeftWidth: '4px',
borderLeftColor: 'hsl(var(--border))',
color: 'hsl(var(--muted-foreground))',
paddingLeft: '1em',
marginLeft: '0',
fontStyle: 'normal',
},
// Lists
ul: {
paddingLeft: '2em',
marginTop: '0',
marginBottom: '1em',
},
ol: {
paddingLeft: '2em',
marginTop: '0',
marginBottom: '1em',
},
li: {
marginTop: '0.25em',
marginBottom: '0.25em',
},
'li > ul, li > ol': {
marginTop: '0.25em',
marginBottom: '0.25em',
},
// Tables - GitHub style
table: {
width: '100%',
borderCollapse: 'collapse',
marginTop: '0',
marginBottom: '1em',
},
thead: {
borderBottom: '2px solid hsl(var(--border))',
},
'thead th': {
padding: '0.75em 1em',
fontWeight: '600',
textAlign: 'left',
},
'tbody td': {
padding: '0.75em 1em',
borderTop: '1px solid hsl(var(--border))',
},
'tbody tr:nth-child(even)': {
backgroundColor: 'hsl(var(--muted) / 0.3)',
},
// Horizontal rule
hr: {
borderColor: 'hsl(var(--border))',
marginTop: '1.5em',
marginBottom: '1.5em',
},
// Images - component handles path resolution and 880px max-width
},
},
}),
},
},
plugins: [
require('@tailwindcss/typography'),
],
}