-
Notifications
You must be signed in to change notification settings - Fork 1
/
tailwind.config.js
103 lines (102 loc) · 2.68 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
98
99
100
101
102
103
const flattenColorPalette =
require("tailwindcss/lib/util/flattenColorPalette").default;
const svgToDataUri = require("mini-svg-data-uri");
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{js,ts,jsx,tsx}",
"./components/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {
screens: {
xs: "475px",
},
colors: {
blue: {
DEFAULT: "#54C8E8",
50: "#F6FCFE",
100: "#E4F6FB",
200: "#C0EBF7",
300: "#9CDFF2",
400: "#78D4ED",
500: "#54C8E8",
600: "#23B8E1",
700: "#1892B4",
800: "#126A82",
900: "#0B4251",
},
pink: {
DEFAULT: "#FF40B4",
50: "#FFF8FC",
100: "#FFE3F4",
200: "#FFBAE4",
300: "#FF92D4",
400: "#FF69C4",
500: "#FF40B4",
600: "#F00A95",
700: "#CF007E",
800: "#97005C",
900: "#5F0039",
},
yellow: {
DEFAULT: "#FFCD02",
50: "#FFF1BA",
100: "#FFEDA5",
200: "#FFE57C",
300: "#FFDD54",
400: "#FFD52B",
500: "#FFCD02",
600: "#C9A100",
700: "#917400",
800: "#594700",
900: "#211A00",
},
},
fontFamily: {
sans: ["Inter", "sans-serif"],
},
keyframes: {
chillin: {
"0%, 100%": { transform: "translateY(0)" },
"50%": { transform: "translateY(-8vw)" },
},
aurora: {
from: { backgroundPosition: "50% 50%, 50% 50%" },
to: { backgroundPosition: "350% 50%, 350% 50%" },
},
},
animation: {
chillin: "chillin 10s cubic-bezier(.5,0,.5,1) infinite",
aurora: "aurora 60s linear infinite",
},
backgroundImage: {
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
},
},
},
plugins: [
// Add variables for colours
({ addBase, theme }) => {
addBase({
":root": Object.fromEntries(
Object.entries(flattenColorPalette(theme("colors"))).map(
([key, val]) => [`--${key}`, val]
)
),
});
},
function ({ matchUtilities, theme }) {
matchUtilities(
{
"bg-grid": (value) => ({
backgroundImage: `url("${svgToDataUri(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="none" stroke="${value}"><path d="M0 .5H31.5V32"/></svg>`
)}")`,
}),
},
{ values: flattenColorPalette(theme("backgroundColor")), type: "color" }
);
},
],
};