-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
386 lines (381 loc) · 9.91 KB
/
Copy pathtailwind.config.ts
File metadata and controls
386 lines (381 loc) · 9.91 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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
import typography from "@tailwindcss/typography";
import twHLJS from "tailwind-highlightjs";
import { type Config } from "tailwindcss";
import { burstColors, burstTextColors } from "./static/colors.ts";
const deCSS = {
'h1, h2, h3, h4, h5, h6': {
scrollMarginTop: '6rem', // Adjust for desired spacing
marginTop: "2rem",
marginBottom: "0.5rem",
fontFamily: "Fixel"
},
h1: {
color: burstTextColors.subtitles,
fontSize: "2rem",
marginBottom: "-1rem",
fontWeight: "700",
strong: {
color: burstColors.accRed,
},
},
h2: {
color: burstColors.accLiteGreen,
fontSize: "1.875rem",
fontWeight: "600",
fontStyle: "italic;",
textDecoration: "underline",
textDecorationColor: burstColors.creamTan,
strong: {
fontWeight: "800",
color: burstColors.accRed,
},
},
h3: {
color: burstTextColors.subtitles,
fontSize: "1.5rem",
fontWeight: "600",
paddingLeft: "1rem", // Add padding for 2-space indent
},
h4: {
color: burstColors.accLiteGreen,
fontSize: "1.25rem",
fontWeight: "600",
paddingLeft: "1rem", // Add padding for 2-space indent
strong: {
color: burstColors.accRed,
},
},
p: {
color: burstColors.creamTan,
lineHeight: "1.6",
fontSize: "1.2rem",
fontFamily: "Fixel",
fontWeight: 500,
code: {
color: burstTextColors.white,
backgroundColor: burstColors.transGray,
padding: "0.1em 0.4em 0.15em",
borderRadius: "0.25rem",
fontFamily: "monospace",
fontSize: "0.85em",
},
pre: {
backgroundColor: burstColors.termBack1,
padding: "1rem",
borderRadius: "0.5rem",
color: burstTextColors.white,
overflowX: "auto",
},
strong: {
color: burstTextColors.transWhite,
fontWeight: "900"
},
em: {
color: burstColors.subtitles2
},
},
a: {
color: burstColors.accGreen,
textDecoration: "underline",
code: {
color: burstColors.accGreen,
},
"&:visited": {
color: burstColors.accLitePurple,
code: {
color: burstColors.accLitePurple,
},
"&:hover": {
color: burstColors.accRed,
},
},
"&:hover": {
color: burstColors.accRed,
},
"& img": {
borderBottom: `1px solid ${burstColors.accGreen}`, // Add underline for images in links
textDecoration: "none",
display: "inline-block",
verticalAlign: "middle",
},
"&:visited img": {
borderColor: burstColors.accLitePurple, // Change underline color to red on hover
},
"&:hover img": {
borderColor: burstColors.accRed, // Change underline color to red on hover
},
},
img: {
display: "block",
margin: "1.5rem auto", // Top/bottom margin, center horizontally
padding: "0", // Reset padding if needed
maxWidth: "100%", // Make images responsive
height: "auto",
},
ol: {
"list-style-type": "decimal", // Ensure ordered list numbering
padding: "0rem 3rem",
},
pre: {
"@apply overflow-hidden whitespace-pre-wrap break-words p-4": {},
paddingLeft: "1rem",
paddingRight: "1rem",
"code.hljs": {
"@apply rounded-t-lg": {}, // Add the rounded-t-lg only for non-Mermaid blocks
padding: "1.75rem 2rem 0rem",
},
"code.language-mermaid": {
"@apply rounded-lg": {}, // Add the rounded-t-lg only for non-Mermaid blocks
padding: "1.75rem 0.2rem 0rem",
transition: "opacity 0.3s ease",
},
},
"pre.mermaid":{
display: "flex",
alignItems: "center",
justifyContent: "center",
overflow: "auto",
whiteSpace: "normal",
minHeight: "100px",
},
"pre:has(.mermaid)": {
"@apply overflow-hidden p-0 my-4": {},
},
".code-line": {
"@apply flex items-center": {},
lineHeight: "1.75",
margin: "0 !important", // Remove unintended margins
padding: "0 !important", // Remove unintended paddings
height: "auto", // Ensure it adapts to content
},
".code-line > span": {
"@apply inline-block": {},
margin: "0 !important",
padding: "0 !important",
maxWidth: "100%", // Prevent overflowing
overflow: "hidden", // Hide excess content
textOverflow: "ellipsis", // Truncate if necessary
},
".copy-line-button": {
"@apply text-sm ml-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300 cursor-pointer":
{},
lineHeight: "1", // Prevent button affecting line height
marginTop: "0", // Remove vertical spacing impact
marginBottom: "0",
},
"ol > li": {
lineHeight: "1.6",
fontSize: "1.2rem",
fontFamily: "Fixel",
fontWeight: 400,
code: {
color: burstTextColors.white,
backgroundColor: burstColors.transGray,
padding: "0.1em 0.4em 0.15em",
borderRadius: "0.25rem",
fontFamily: "monospace",
fontSize: "0.85em",
},
strong: {
color: burstTextColors.transWhite,
fontWeight: "900"
},
em: {
color: burstColors.subtitles2
},
"margin-top": "0.5rem", // Add vertical spacing between list items
"margin-bottom": "0.5rem", // Same for bottom spacing
"&::marker": {
color: burstTextColors.subtitles, // Customize the marker color
fontWeight: "bold", // Optional: make markers bold
},
color: burstColors.creamTan2,
},
"ol ul": {
"list-style-type": "disc", // Explicitly enable bullets
"margin-left": "2rem", // Ensure proper indentation
"padding-left": "1rem", // Adjust spacing
"li::marker": {
color: burstTextColors.subtitles, // Customize the marker color
fontWeight: "bold", // Optional: make markers bold
},
},
"ol > li > p": {
"margin-top": "0", // Remove extra top margin from nested <p>
"margin-bottom": "0", // Remove extra bottom margin
"display": "inline", // Ensure <p> inside <li> doesn't break flow
color: burstColors.creamTan2,
lineHeight: "1.6",
fontSize: "1.2rem",
fontFamily: "Fixel",
fontWeight: 400,
code: {
color: burstTextColors.white,
backgroundColor: burstColors.transGray,
padding: "0.1em 0.4em 0.15em",
borderRadius: "0.25rem",
fontFamily: "monospace",
fontSize: "0.85em",
},
pre: {
backgroundColor: burstColors.termBack1,
padding: "1rem",
borderRadius: "0.5rem",
color: burstTextColors.white,
overflowX: "auto",
},
strong: {
color: burstTextColors.transWhite,
fontWeight: "900"
},
"&::marker": {
color: burstTextColors.subtitles, // Customize the marker color
fontWeight: "bold", // Optional: make markers bold
},
},
".marked-emoji-img": {
display: "inline-block",
width: "1.1em",
height: "1.1em",
verticalAlign: "-0.2em",
position: "relative",
margin: "0",
padding: "0",
},
"figure.custom-image": {
display: "flex",
flexDirection: "column",
alignItems: "center",
margin: "1.5rem auto", // Margin around the figure
img: {
borderRadius: "0.5rem",
maxWidth: "100%",
height: "auto",
},
code: {
color: burstTextColors.transWhite,
backgroundColor: burstColors.trans2Gray,
padding: "0.1em 0.4em",
borderRadius: "0.25rem",
fontFamily: "monospace",
fontSize: "0.85em",
},
figcaption: {
marginTop: "-1rem", // Small space between image and caption
color: burstTextColors.subtitles,
padding: "0.2rem 0", // Slight padding for clarity
fontSize: "1rem",
fontFamily: "Source4",
textAlign: "center",
fontStyle: "italic",
fontWeight: "400",
},
"& + *": {
marginTop: "1.5rem", // Normal gap after the figure to the next content
},
},
hr: {
margin: "-0.3rem 1.75rem 0.9rem -2rem"
}
}
export default {
content: [
"{routes,islands,components}/**/*.{ts,tsx,js,jsx}",
],
safelist: [{
pattern: /hljs+/,
}],
mode: "jit",
theme: {
extend: {
colors: burstColors,
textColor: burstTextColors,
fontFamily: {
'teko': ['Teko'],
'source4': ['Source4'],
'fixel': ['Fixel']
},
keyframes: {
fadeIn: {
'0%': { opacity: '0', transform: 'translateY("8px")' },
'100%': { opacity: '1', transform: 'translateY(0)' },
},
},
animation: {
'fade-in': 'fadeIn 3s ease-in-out forwards',
},
},
screens: {
md: "1463px"
},
hljs: {
theme: "base16/solarized-dark",
},
typography: {
xl: {
css: deCSS
},
lg: {
css: {
...deCSS,
h1: {
...deCSS.h1,
fontSize: "1.6rem",
},
h2: {
...deCSS.h2,
fontSize: "1.4rem",
},
h3: {
...deCSS.h3,
fontSize: "1.2rem",
},
h4: {
...deCSS.h4,
fontSize: "1rem",
},
p: {
...deCSS.p,
fontSize: "1rem",
code: {
...deCSS.p.code,
fontSize: "0.85em",
},
},
"ol > li": {
...deCSS["ol > li"],
fontSize: "1rem",
code: {
...deCSS["ol > li"].code,
fontSize: "0.85em",
},
},
"ol > li > p": {
...deCSS["ol > li > p"],
fontSize: "1rem",
code: {
...deCSS["ol > li > p"].code,
fontSize: "0.85em",
},
},
"figure.custom-image": {
...deCSS["figure.custom-image"],
figcaption: {
...deCSS["figure.custom-image"].figcaption,
fontSize: "0.9em",
},
code: {
...deCSS["figure.custom-image"].code,
fontSize: "0.8em",
},
},
hr: {
margin: "-0.4rem 1.75rem 0.9rem -1.23rem"
}
}
}
},
},
variants: {},
plugins: [typography, twHLJS],
} satisfies Config;