-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
47 lines (42 loc) · 1.09 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
import { fromPairs, toPairs } from "rambdax";
import { type Config } from "tailwindcss";
import defaultConfig from "tailwindcss/defaultConfig";
type FontSizeRaw = NonNullable<NonNullable<Config["theme"]>["fontSize"]>;
type FontSize = Exclude<FontSizeRaw, (...args: never[]) => unknown>;
const fontSize = fromPairs(
toPairs((defaultConfig.theme?.fontSize ?? {}) as unknown as FontSize).map(
([key, value]) => {
if (typeof value === "string") {
return [key, value];
}
const [size, _config] = value;
return [key, size];
},
),
) satisfies FontSize;
export default {
content: ["./src/**/*.{js,ts,jsx,tsx}"],
theme: {
fontSize,
extend: {
colors: {
black: "#1a1a1a",
primary: "#ff8c00",
secondary: "#28282d",
"off-black": "#1e1e22",
},
fontFamily: {
sans: ["var(--font-family-ui)"],
mono: ["var(--font-family-mono)"],
},
container: {
center: true,
padding: "3rem",
},
screens: {
br: "1024px",
},
},
},
plugins: [],
} satisfies Config;