-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
61 lines (52 loc) · 1.6 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
/** @type {import('tailwindcss').Config} */
const { default: flattenColorPalette } = require('tailwindcss/lib/util/flattenColorPalette');
module.exports = {
content: ['src/components/**/*.{ts,tsx}', 'app/**/*.{ts,tsx}', './src/**/*.{ts,tsx}'],
theme: {
extend: {
screens: {
md: { max: '600px' },
},
colors: {
primary: '#CCC2DC',
'bg-1': '#141218',
'bg-2': '#211F26',
'text-1': '#E6E0E9',
'gray-1': '#303030',
stroke: '#4A4458',
},
animation: {
aurora: 'aurora 60s linear infinite',
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
aurora: {
from: {
backgroundPosition: '50% 50%, 50% 50%',
},
to: {
backgroundPosition: '350% 50%, 350% 50%',
},
},
},
},
},
plugins: [addVariablesForColors, require('tailwindcss-animate')],
};
// This plugin adds each Tailwind color as a global CSS variable, e.g. var(--gray-200).
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,
});
}