-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.js
97 lines (90 loc) · 2.16 KB
/
tailwind.config.js
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
const defaultTheme = require("tailwindcss/defaultTheme");
const colors = require("tailwindcss/colors");
// Deleted deprecated colors
delete colors.lightBlue;
delete colors.warmGray;
delete colors.trueGray;
delete colors.coolGray;
delete colors.blueGray;
const customColors = {
tahiti: {
light: "#67e8f9",
DEFAULT: "#06b6d4",
dark: "#0e7490",
100: "#cffafe",
200: "#a5f3fc",
300: "#67e8f9",
400: "#22d3ee",
500: "#06b6d4",
600: "#0891b2",
700: "#0e7490",
800: "#155e75",
900: "#164e63",
},
};
const {
default: flattenColorPalette,
} = require("tailwindcss/lib/util/flattenColorPalette");
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
"./public/index.html",
"./index.html",
"./node_modules/flowbite-react/lib/esm/**/*.js",
"./node_modules/flowbite/**/*.js",
],
theme: {
colors: {
primary: "#5c6ac4",
secondary: "#ecc94b",
transparent: "transparent",
current: "currentColor",
white: "#ffffff",
...customColors,
},
extend: {
colors: {
...colors,
// gray: colors.neutral,
gray: colors.slate,
// gray: customColors.tahiti,
},
animation: {
scroll:
"scroll var(--animation-duration, 40s) var(--animation-direction, forwards) linear infinite",
},
keyframes: {
scroll: {
to: {
transform: "translate(calc(-50% - 0.5rem))",
},
},
},
boxShadow: {
input: `0px 2px 3px -1px rgba(0,0,0,0.1), 0px 1px 0px 0px rgba(25,28,33,0.02), 0px 0px 0px 1px rgba(25,28,33,0.08)`,
},
borderRadius: {
// sm: "0rem",
// md: "0rem",
// lg: "0rem",
// xl: "0rem",
},
},
},
plugins: [
require("flowbite/plugin"),
require("flowbite/plugin")({
charts: true,
}),
addVariablesForColors,
],
};
function addVariablesForColors({ addBase, theme }: any) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}