-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
109 lines (107 loc) · 3.47 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
/** @type {import('tailwindcss').Config} */
import defaultTheme from 'tailwindcss/defaultTheme';
import colors from 'tailwindcss/colors';
import twThemer from 'tailwindcss-themer';
import twGradientMaskImage from 'tailwind-gradient-mask-image';
const brandColors = {
orange: {
aws: '#f90',
awshover: '#ec7211',
},
};
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
},
animation: {
'error-shake': 'shake 500ms ease 1',
'toast-enter': 'toastEnter 200ms ease-in',
'toast-exit': 'toastLeave 200ms ease-in',
},
keyframes: {
shake: {
'0%, 100%': { transform: 'translateX(0)' },
'16%': { transform: 'translateX(10px)' },
'32%': { transform: 'translateX(-10px)' },
'48%': { transform: 'translateX(4px)' },
'64%': { transform: 'translateX(-4px)' },
'80%': { transform: 'translateX(2px)' },
'96%': { transform: 'translateX(-2px)' },
},
fadeScale: {
'0%': { opacity: '0', transform: 'scale(0.2)' },
'100%': { opacity: '1', transform: 'scale(1)' },
},
toastEnter: {
'0%': { transform: 'scale(0.9)', opacity: 0 },
'100%': { transform: 'scale(1)', opacity: 1 },
},
toastLeave: {
'0%': { transform: 'scale(1)', opacity: 1 },
'100%': { transform: 'scale(0.9)', opacity: 0 },
},
},
},
},
plugins: [
twThemer({
defaultTheme: {
extend: {
colors: {
orange: brandColors.orange,
primary: brandColors.orange.aws,
primaryAlt: brandColors.orange.awshover,
secondary: colors.neutral[500],
secondaryAlt: colors.neutral[700],
positive: colors.emerald[500],
positiveAlt: colors.emerald[700],
destruct: colors.red[500],
destructAlt: colors.red[700],
warn: colors.yellow[300],
warnAlt: colors.yellow[500],
uiText: colors.neutral[900],
uiTextAlt: colors.neutral[100],
surface: colors.white,
surfaceAlt: colors.neutral[100],
surfaceAlt2: colors.black,
surfaceAlt3: colors.neutral[200],
border: colors.neutral[200],
overlay: colors.neutral[100],
},
},
},
themes: [
{
name: 'dark-theme',
mediaQuery: '@media (prefers-color-scheme: dark)',
extend: {
colors: {
primary: brandColors.orange.aws,
primaryAlt: brandColors.orange.awshover,
secondary: colors.neutral[500],
secondaryAlt: colors.neutral[700],
positive: colors.emerald[600],
positiveAlt: colors.emerald[500],
destruct: colors.red[600],
destructAlt: colors.red[500],
warn: colors.yellow[500],
warnAlt: colors.yellow[400],
uiText: colors.neutral[300],
uiTextAlt: colors.neutral[700],
surface: colors.black,
surfaceAlt: colors.neutral[900],
surfaceAlt2: colors.white,
surfaceAlt3: colors.neutral[800],
border: colors.neutral[800],
overlay: colors.neutral[900],
},
},
},
],
}),
twGradientMaskImage,
],
};