-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtailwind.config.ts
111 lines (107 loc) · 3 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
import daisyui from "daisyui";
import daisyThemes from "daisyui/src/theming/themes";
import type { Config } from "tailwindcss";
const pxToRem = (px, base = 16) => `${px / base}rem`;
const range = (start, end) => {
return Array.from({ length: end - start + 1 }, (_, index) => index + start);
};
const getPxrSystem = () => {
return range(1, 1400).reduce((accumulate, px) => {
accumulate[`${px}pxr`] = pxToRem(px);
return accumulate;
}, {});
};
const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
safelist: [
{ pattern: /rounded-/ },
{ pattern: /w-/ },
{
pattern:
/bg-(primary|secondary|background|surface1|surface2|card|tooltip|toolbar|delete|tag|black)/,
},
{ pattern: /text-(text-primary|text-secondary|white|black|neutral)/ },
{ pattern: /shadow-/ },
],
theme: {
extend: {
screens: {
lg: "1220px",
md: "920px",
sm: "620px",
},
spacing: {
...getPxrSystem(),
},
borderRadius: {
...getPxrSystem(),
},
colors: {
white: "#FFFFFF",
black: "#000000",
neutral: "#535353",
border: "#807F7F",
primary: "#246FFF",
secondary: "var(--secondary)",
"text-primary": "rgb(var(--text-primary) / <alpha-value>)",
"text-secondary": "var(--text-secondary)",
"text-tertiary": "var(--text-tertiary)",
surface1: "var(--surface1)",
surface2: "var(--surface2)",
background: "var(--background)",
card: "var(--card)",
tooltip: "var(--tooltip)",
toolbar: "var(--toolbar)",
icon: "var(--icon)",
delete: "#ED0000",
tag: "#570DF8",
badge: "var(--badge)",
"adaptive-shadow": "rgb(var(--shadow) / 0.1)",
},
},
},
plugins: [daisyui],
daisyui: {
themes: [
{
light: {
...daisyThemes.light,
"--secondary": "#E2F4FF",
"--text-primary": "0 0 0",
"--text-secondary": "#535353",
"--text-tertiary": "#FFFFFF",
"--surface1": "#78C6FF",
"--surface2": "#FFB015",
"--background": "#FFFFFF",
"--card": "#D9D9D9",
"--tooltip": "#535353",
"--toolbar": "#858383",
"--icon": "#807F7F",
"--badge": "#000000",
"--shadow": "0 0 0",
},
dark: {
...daisyThemes.dark,
"--secondary": "#2600BD",
"--text-primary": "255 255 255",
"--text-secondary": "#8EB4FF",
"--text-tertiary": "#000000",
"--surface1": "#552AFF",
"--surface2": "#B2B9FF",
"--background": "#000D27",
"--card": "#00194A",
"--tooltip": "#11419E",
"--toolbar": "#002873",
"--icon": "#FFFFFF",
"--badge": "#FFFFFF",
"--shadow": "255 255 255",
},
},
],
},
};
export default config;