-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
tailwind.config.js
64 lines (62 loc) · 1.51 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
import { nextui } from "@nextui-org/react";
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{js,ts,jsx,tsx}",
"./node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
],
theme: {
screens: {
xs: "320px",
"2xs": "430px",
"3xs": "520px",
sm: "640px",
md: "768px",
mdb: "880px",
lg: "1024px",
lgb: "1175px",
xl: "1280px",
"2xl": "1440px",
"3xl": "1760px",
},
fontFamily: {
poppinsLight: ["Poppins-Light"],
poppinsRegular: ["Poppins-Regular"],
poppinsMedium: ["Poppins-Medium"],
poppinsSemiBold: ["Poppins-SemiBold"],
poppinsBold: ["Poppins-Bold"],
},
extend: {
borderRadius: {
"4xl": "46px",
},
colors: {
primaryGreen: "#00FF6B",
primaryGray: "#B6B6B6",
primaryGray2: "#F4F4F4",
primaryBg: "#F3F4F7",
darkPrimaryBg: "#1B1B1B",
},
},
},
darkMode: "class",
plugins: [
addVariablesForColors,
nextui(),
function ({ addVariant }) {
addVariant("child", "& > *");
addVariant("child-hover", "& > *:hover");
},
],
};
function addVariablesForColors({ addBase, theme }) {
let allColors = flattenColorPalette(theme("colors"));
let newVars = Object.fromEntries(
Object.entries(allColors).map(([key, val]) => [`--${key}`, val])
);
addBase({
":root": newVars,
});
}