-
Notifications
You must be signed in to change notification settings - Fork 5
/
tailwind.config.js
238 lines (236 loc) · 7.7 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
const defaultTheme = require('tailwindcss/defaultTheme')
/** @type {import('tailwindcss').Config} */
module.exports = {
future: {
hoverOnlyWhenSupported: true,
},
darkMode: ['class', '[data-theme="dark"]'],
theme: {
extend: {
// Allows the use of the font-sans, font-body, font-caption utility class to apply the font to any element
fontFamily: {
sans: [
'var(--headline)',
'var(--font-satoshi)',
...defaultTheme.fontFamily.sans,
],
body: [
'var(--body)',
'var(--font-space-mono)',
...defaultTheme.fontFamily.sans,
],
caption: ['var(--caption)', ...defaultTheme.fontFamily.mono],
satoshi: ['var(--font-satoshi)', ...defaultTheme.fontFamily.sans],
mono: ['var(--font-space-mono)', ...defaultTheme.fontFamily.mono],
headline: ['var(--headline)', ...defaultTheme.fontFamily.sans],
},
colors: {
current: 'currentColor',
transparent: 'transparent',
black: '#000000',
white: '#ffffff',
background: 'rgb(var(--color-background) / <alpha-value>)',
primary: 'rgb(var(--color-primary) / <alpha-value>)',
secondary: 'rgb(var(--color-secondary) / <alpha-value>)',
tertiary: 'rgb(var(--color-tertiary) / <alpha-value>)',
highlight: 'rgb(var(--color-highlight) / <alpha-value>)',
},
borderRadius: {
object: 'var(--border-radius-object)',
button: 'var(--border-radius-button)',
},
data: {
open: 'state="open"',
closed: 'state="closed"',
bottom: 'side="bottom"',
top: 'side="top"',
},
animation: {
// Dropdown menu
'scale-in': 'scale-in 0.2s ease-in-out',
'slide-down':
'slide-down 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important',
'slide-up': 'slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important',
fakeFade: 'fakeAnimation 300ms cubic-bezier(0.23, 1, 0.32, 1)',
fadeOut: 'fadeOut 300ms cubic-bezier(0.23, 1, 0.32, 1)',
fadeOutUp: 'fadeOutUp 300ms cubic-bezier(0.23, 1, 0.32, 1) !important',
fadeIn: 'fadeIn 300ms cubic-bezier(0.23, 1, 0.32, 1)',
fadeInUp: 'fadeInUp 300ms cubic-bezier(0.23, 1, 0.32, 1)',
fadeInDown:
'fadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1) !important',
fadeOutDown:
'fadeOutDown 300ms cubic-bezier(0.23, 1, 0.32, 1) !important',
longFadeInDown:
'longFadeInDown 500ms cubic-bezier(0.23, 1, 0.32, 1) forwards ',
longFadeInUp:
'longFadeInUp 500ms cubic-bezier(0.23, 1, 0.32, 1) forwards ',
longFadeInUp:
'longFadeInUp 500ms cubic-bezier(0.23, 1, 0.32, 1) forwards ',
slideInFromRight:
'enter-from-right 500ms cubic-bezier(0.23, 1, 0.32, 1) forwards ',
slideOutToRight:
'enter-to-right 500ms cubic-bezier(0.23, 1, 0.32, 1) forwards ',
// Navigation menu
'enter-from-right': 'enter-from-right 0.25s ease',
'enter-from-left': 'enter-from-left 0.25s ease',
'exit-to-right': 'exit-to-right 0.25s ease',
'exit-to-left': 'exit-to-left 0.25s ease',
},
keyframes: {
fadeInDown: {
from: {
opacity: '0',
transform: 'translateY(16)',
},
to: {
opacity: '1',
transform: 'translateY(0)',
},
},
// Dropdown menu
'scale-in': {
'0%': { opacity: 0, transform: 'scale(0)' },
'100%': { opacity: 1, transform: 'scale(1)' },
},
'slide-down': {
'0%': { opacity: 0, transform: 'translateY(-10px)' },
'100%': { opacity: 1, transform: 'translateY(0)' },
},
'slide-up': {
'0%': { opacity: 0, transform: 'translateY(10px)' },
'100%': { opacity: 1, transform: 'translateY(0)' },
},
fadeInUp: {
from: {
opacity: '0',
transform: 'translateY(-16)',
},
to: {
opacity: '1',
transform: 'translateY(0)',
},
},
// Drawer
'enter-from-right': {
'0%': { transform: 'translateX(200px)', opacity: 0 },
'100%': { transform: 'translateX(0)', opacity: 1 },
},
'enter-from-left': {
'0%': { transform: 'translateX(-200px)', opacity: 0 },
'100%': { transform: 'translateX(0)', opacity: 1 },
},
'exit-to-right': {
'0%': { transform: 'translateX(0)', opacity: 1 },
'100%': { transform: 'translateX(200px)', opacity: 0 },
},
'exit-to-left': {
'0%': { transform: 'translateX(0)', opacity: 1 },
'100%': { transform: 'translateX(-200px)', opacity: 0 },
},
fadeOutUp: {
from: {
opacity: '1',
transform: 'translateY(0)',
},
to: {
opacity: '0',
transform: 'translateY(16)',
},
},
fadeOutDown: {
from: {
opacity: '1',
transform: 'translateY(0)',
},
to: {
opacity: '0',
transform: 'translateY(-16)',
},
},
longFadeInDown: {
from: {
transform: 'translate3d(0, 0%, 0)',
},
to: {
transform: 'translate3d(0, 100%, 0)',
},
},
longFadeInUp: {
from: {
transform: 'translate3d(0, 100%, 0)',
},
to: {
transform: 'translate3d(0, 0%, 0)',
},
},
fadeOut: {
from: {
opacity: 1,
},
to: {
opacity: 0,
},
},
fadeIn: {
from: {
opacity: 0,
},
to: {
opacity: 1,
},
},
fakeAnimation: {
from: {
opacity: 1,
},
to: {
opacity: 1,
},
},
},
backgroundImage: {
'default-auction': "url('/default-auction.svg')",
},
boxShadow: ({ theme }) => ({
glow: '0 0 4px rgb(0 0 0 / 0.1)',
dropShadow: 'var(--shadow-spread)',
// inspired by https://www.joshwcomeau.com/shadow-palette/
'surface-glass': `
inset 0.25px 1px 0 0 ${theme('colors.primary / 3%')},
0px 0.3px 0.3px rgba(3, 2, 2, 0.02),
0px 2.2px 2.5px -0.4px rgba(3, 2, 2, 0.02),
0px 4.3px 4.8px -0.8px rgba(3, 2, 2, 0.02),
0px 7.5px 8.4px -1.2px rgba(3, 2, 2, 0.02),
0px 12.8px 14.4px -1.7px rgba(3, 2, 2, 0.02),
0px 21px 23.6px -2.1px rgba(3, 2, 2, 0.02),
0px 33.2px 37.4px -2.5px rgba(3, 2, 2, 0.02)`,
'surface-elevation-low': `
inset 0.25px 1px 1px 0 ${theme('colors.primary / 1.5%')},
0.3px 0.5px 0.7px rgba(3, 2, 2, 0.2),
0.4px 0.8px 1px -1.2px rgba(3, 2, 2, 0.2),
1px 2px 2.5px -2.5px rgba(3, 2, 2, 0.2);`,
'surface-elevation-medium': `
inset 0.25px 1px 1px 0 ${theme('colors.primary / 3%')},
0.3px 0.5px 0.7px rgba(3, 2, 2, 0.1),
0.8px 1.6px 2px -0.8px rgba(3, 2, 2, 0.1),
2.1px 4.1px 5.2px -1.7px rgba(3, 2, 2, 0.1),
5px 10px 12.6px -2.5px rgba(3, 2, 2, 0.1)`,
slider: '0 0 0 5px rgba(0, 0, 0, 0.3)',
}),
zIndex: {
'sheet-0': 999,
'sheet-1': 1000,
'sheet-2': 1001,
},
inset: {
'38': '10.5rem',
},
},
},
content: [
'./components/**/*.{js,ts,jsx,tsx}',
'./pages/**/*.{js,ts,jsx,tsx}',
'./app/**/*.{js,ts,jsx,tsx}',
],
plugins: [require('tailwindcss-radix')(), require('@tailwindcss/typography')],
}