-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
156 lines (155 loc) · 4.92 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
const plugin = require('tailwindcss/plugin');
// customer loaders
const getSpinners = (themeColors) => {
return Object.keys(themeColors).map((color) => {
return {
[`.loader-${color}`]: {
'border-top-color': themeColors[color][500] || themeColors[color],
'border-left-color': themeColors[color][200] || 'border-gray-200',
'border-right-color': themeColors[color][200] || 'border-gray-200',
'border-bottom-color': themeColors[color][200] || 'border-gray-200',
},
};
});
};
module.exports = {
darkMode: 'class',
// you can use https://tailwind.ink/code to help come up with pallette colors
theme: {
extend: {
colors: {
'primary': {
400: '#B7B0FF',
500: '#53A0FD',
},
'primary-dark': {
400: '#353839',
500: '#121212',
},
'secondary': {
500: '#C5FF5C',
},
'secondary-dark': {
500: '#94bf45',
},
'gradient': {
color: `linear-gradient(90deg,#53A0FD, #C5FF5C,#B7B0FF,#53A0FD, #C5FF5C, #B7B0FF)`,
},
},
animation: {
'marquee': 'marquee 136.863s linear infinite',
'marquee-reverse': 'marquee-reverse 136.863s linear infinite',
'marquee-2': 'marquee-2 136.863s linear infinite',
'marquee-reverse-2': 'marquee-reverse-2 136.863s linear infinite',
'rainbow': 'rainbow 5s linear infinite',
},
keyframes: {
'marquee': {
'0%': {transform: 'translateX(0%)'},
'100%': {transform: 'translateX(-100%)'},
},
'marquee-reverse': {
'100%': {transform: 'translateX(0%)'},
'0%': {transform: 'translateX(-100%)'},
},
'marquee-2': {
'0%': {transform: 'translateX(100%)'},
'100%': {transform: 'translateX(0%)'},
},
'marquee-reverse-2': {
'100%': {transform: 'translateX(-100%)'},
'0%': {transform: 'translateX(0%)'},
},
'rainbow': {
'0%': {'background-position': '0 50%'},
'100%': {'background-position': '400% 50%'},
},
},
flex: {
'0-0-auto': '0 0 auto',
},
},
},
plugins: [
plugin(function({addComponents, theme}) {
const themeColors = theme('colors', {});
addComponents(getSpinners(themeColors));
addComponents({
'.box-shadow': {
boxShadow: '0 0 1rem #cccccc',
borderRadius: '0.5rem',
},
'.divider-horizontal:before': {
content: '\'\'',
flex: '1 1',
borderBottom: `1px solid ${themeColors.gray[300]}`,
margin: 'auto',
},
'.divider-horizontal:after': {
content: '\'\'',
flex: '1 1',
borderBottom: `1px solid ${themeColors.gray[300]}`,
margin: 'auto',
},
'.divider-vertical': {
content: '\'\'',
background: `linear-gradient(${themeColors.gray[300]},${themeColors.gray[300]}) no-repeat center/2px 100%`,
height: '100%',
minHeight: '1rem',
width: '1px',
},
'.bg-rainbow': {
'backgroundSize': `400% 200%`,
// 'backgroundImage': `linear-gradient(90deg,#32fe31,#33f7f5,#4779ed,#9263d2,#ff0b00,#9263d2,#4779ed,#33f7f5)`, rainbow gradient
'backgroundImage': `linear-gradient(90deg,#53A0FD, #C5FF5C,#B7B0FF,#53A0FD, #C5FF5C, #B7B0FF)`, // my custom gradient
},
'.bg-rainbow-animate': {
'backgroundSize': `400% 200%`,
'backgroundImage': `linear-gradient(90deg,#32fe31,#33f7f5,#4779ed,#9263d2,#ff0b00,#9263d2,#4779ed,#33f7f5)`,
'animationName': `rainbow`,
'animationDuration': `5s`,
'animationIterationCount': `infinite`,
'animationTimingFunction': `linear`,
},
});
}),
plugin(({addUtilities}) => {
const newUtilities = {
'.animate-fadeIn': {
'-webkit-animation-name': 'animate-fadeIn',
'animation-name': 'animate-fadeIn',
'-webkit-animation-duration': '1s',
'animation-duration': '1s',
'-webkit-animation-fill-mode': 'both',
'animation-fill-mode': 'both',
},
'.animate-fadeOut': {
'-webkit-animation-name': 'animate-fadeOut',
'animation-name': 'animate-fadeOut',
'-webkit-animation-duration': '1s',
'animation-duration': '1s',
'-webkit-animation-fill-mode': 'both',
'animation-fill-mode': 'both',
},
'.bg-clip-text': {
'-webkit-background-clip': 'text',
},
};
addUtilities(newUtilities);
}),
],
// Filenames to scan for classes
content: [
'./src/**/*.html',
'./src/**/*.js',
'./src/**/*.jsx',
'./src/**/*.ts',
'./src/**/*.tsx',
'./public/index.html',
],
// Options passed to PurgeCSS
options: {
// Whitelist specific selectors by name
// safelist: [],
},
};