Skip to content

Commit 09f1616

Browse files
committed
Add tailwind config.
1 parent 06a7b82 commit 09f1616

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

remark-collapse.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module 'remark-collapse';

tailwind.config.cjs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
function withOpacity(variableName) {
2+
return ({ opacityValue }) => {
3+
if (opacityValue !== undefined) {
4+
return `rgba(var(${variableName}), ${opacityValue})`;
5+
}
6+
return `rgb(var(${variableName}))`;
7+
};
8+
}
9+
10+
/** @type {import('tailwindcss').Config} */
11+
module.exports = {
12+
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
13+
theme: {
14+
// Remove the following screen breakpoint or add other breakpoints
15+
// if one breakpoint is not enough for you
16+
screens: {
17+
sm: "640px",
18+
},
19+
20+
extend: {
21+
textColor: {
22+
skin: {
23+
base: withOpacity("--color-text-base"),
24+
accent: withOpacity("--color-accent"),
25+
inverted: withOpacity("--color-fill"),
26+
},
27+
},
28+
backgroundColor: {
29+
skin: {
30+
fill: withOpacity("--color-fill"),
31+
accent: withOpacity("--color-accent"),
32+
inverted: withOpacity("--color-text-base"),
33+
card: withOpacity("--color-card"),
34+
"card-muted": withOpacity("--color-card-muted"),
35+
},
36+
},
37+
outlineColor: {
38+
skin: {
39+
fill: withOpacity("--color-accent"),
40+
},
41+
},
42+
borderColor: {
43+
skin: {
44+
line: withOpacity("--color-border"),
45+
fill: withOpacity("--color-text-base"),
46+
accent: withOpacity("--color-accent"),
47+
},
48+
},
49+
fill: {
50+
skin: {
51+
base: withOpacity("--color-text-base"),
52+
accent: withOpacity("--color-accent"),
53+
},
54+
transparent: "transparent",
55+
},
56+
fontFamily: {
57+
mono: ["IBM Plex Mono", "monospace"],
58+
},
59+
60+
typography: {
61+
DEFAULT: {
62+
css: {
63+
pre: {
64+
color: false,
65+
},
66+
code: {
67+
color: false,
68+
},
69+
},
70+
},
71+
},
72+
},
73+
},
74+
plugins: [require("@tailwindcss/typography")],
75+
};

0 commit comments

Comments
 (0)