This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
226 lines (225 loc) · 6.76 KB
/
tailwind.config.ts
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
226
import tailwindFroms from '@tailwindcss/forms'
import typography from '@tailwindcss/typography'
import type { Config } from 'tailwindcss'
export default {
darkMode: 'media',
content: ['./app/**/*.{tsx,ts}'],
theme: {
extend: {
colors: {
code: {
highlight: 'rgb(125 211 252 / 0.1)',
},
},
typography: (theme: any) => ({
DEFAULT: {
css: {
'maxWidth': 'none',
'color': theme('colors.slate.700'),
'hr': {
borderColor: theme('colors.slate.100'),
marginTop: '3em',
marginBottom: '3em',
},
'.lead': {
fontSize: '1.125em',
lineHeight: 'calc(32 / 18)',
},
'h1, h2, h3': {
letterSpacing: '-0.025em',
},
'h2': {
fontSize: '1.25em',
fontWeight: '600',
marginBottom: `1.25em`,
},
'h3': {
fontSize: '1.125em',
marginTop: '2.4em',
marginBottom: '1em',
lineHeight: '1.4',
},
'h4': {
marginTop: '2.5em',
marginBottom: '0.75em',
fontSize: '1em',
fontWeight: '600',
},
'h2 small, h3 small, h4 small': {
fontFamily: theme('fontFamily.mono').join(', '),
color: theme('colors.slate.500'),
fontWeight: 500,
},
'h2 small': {
fontSize: theme('fontSize.lg')[0],
...theme('fontSize.lg')[1],
},
'h3 small': {
fontSize: theme('fontSize.base')[0],
...theme('fontSize.base')[1],
},
'h4 small': {
fontSize: theme('fontSize.sm')[0],
...theme('fontSize.sm')[1],
},
'h2 code, h3 code': {
font: 'inherit',
},
'ul': {
listStyleType: 'none',
paddingLeft: '1em',
marginTop: '1em',
marginBottom: '2em',
},
'ul > li': {
position: 'relative',
paddingLeft: '0.5em',
listStyleType: 'disc',
marginTop: '0.75em',
marginBottom: '0.75em',
},
'--tw-prose-bullets': theme('colors.slate.300'),
'a': {
fontWeight: theme('fontWeight.semibold'),
textDecoration: 'none',
borderBottom: `1px solid ${theme('colors.sky.300')}`,
},
'a:hover': {
borderBottomWidth: '2px',
},
'a code': {
color: 'inherit',
fontWeight: 'inherit',
},
'strong': {
color: theme('colors.slate.900'),
fontWeight: theme('fontWeight.semibold'),
},
'a strong': {
color: 'inherit',
fontWeight: 'inherit',
},
'kbd': {
background: theme('colors.slate.100'),
borderWidth: '1px',
borderColor: theme('colors.slate.200'),
padding: '0.125em 0.25em',
color: theme('colors.slate.700'),
fontWeight: 500,
fontSize: '0.875em',
fontVariantLigatures: 'none',
borderRadius: '4px',
margin: '0 1px',
},
'code': {
fontWeight: 550,
fontVariantLigatures: 'none',
},
'strong code': {
fontWeight: 650,
},
'pre': {
color: theme('colors.slate.50'),
borderRadius: theme('borderRadius.xl'),
padding: theme('padding.5'),
boxShadow: theme('boxShadow.md'),
display: 'flex',
marginTop: `${20 / 14}em`,
marginBottom: `${32 / 14}em`,
},
'p + pre': {
marginTop: `${-4 / 14}em`,
},
'pre + pre': {
marginTop: `${-16 / 14}em`,
},
'pre code': {
flex: 'none',
minWidth: '100%',
},
'table': {
fontSize: theme('fontSize.sm')[0],
lineHeight: theme('fontSize.sm')[1].lineHeight,
},
'thead': {
color: theme('colors.slate.700'),
borderBottomColor: theme('colors.slate.200'),
},
'thead th': {
paddingTop: 0,
fontWeight: theme('fontWeight.semibold'),
},
'tbody tr': {
borderBottomColor: theme('colors.slate.100'),
},
'tbody tr:last-child': {
borderBottomWidth: '1px',
},
'tbody code': {
fontSize: theme('fontSize.xs')[0],
},
'figure figcaption': {
textAlign: 'center',
fontStyle: 'italic',
},
'figure > figcaption': {
marginTop: `${12 / 14}em`,
},
},
},
dark: {
css: {
'color': theme('colors.slate.400'),
'--tw-prose-lead': theme('colors.slate.400'),
'h2, h3, h4, thead th': {
color: theme('colors.slate.200'),
},
'h2 small, h3 small, h4 small': {
color: theme('colors.slate.400'),
},
'kbd': {
background: theme('colors.slate.700'),
borderColor: theme('colors.slate.600'),
color: theme('colors.slate.200'),
},
'code': {
color: theme('colors.slate.200'),
},
'hr': {
borderColor: theme('colors.slate.200'),
opacity: '0.05',
},
'pre': {
boxShadow: 'inset 0 0 0 1px rgb(255 255 255 / 0.1)',
},
'--tw-prose-bullets': theme('colors.slate.500'),
'a': {
color: theme('colors.white'),
borderBottomColor: theme('colors.sky.400'),
},
'strong': {
color: theme('colors.slate.200'),
},
'thead': {
color: theme('colors.slate.300'),
borderBottomColor: 'rgb(148 163 184 / 0.2)',
},
'tbody tr': {
borderBottomColor: 'rgb(148 163 184 / 0.1)',
},
'blockQuote': {
color: theme('colors.white'),
},
},
},
}),
},
},
future: {
hoverOnlyWhenSupported: true,
},
plugins: [
typography,
tailwindFroms,
],
} satisfies Config