-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.js
147 lines (145 loc) · 5.06 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
const VIEWPORT_PADDING = 25
module.exports = {
darkMode: 'class',
content: [
'./src/pages/**/*.{js,ts,jsx,tsx}',
'./src/components/**/*.{js,ts,jsx,tsx}',
'./src/layouts/**/*.{js,ts,jsx,tsx}',
],
theme: {
fontFamily: {
display: [
'Inter',
'-apple-system',
'BlinkMacSystemFont',
'"Segoe UI"',
'Roboto',
'"Helvetica Neue"',
'Arial',
'"Noto Sans"',
'sans-serif',
'"Apple Color Emoji"',
'"Segoe UI Emoji"',
'"Segoe UI Symbol"',
'"Noto Color Emoji"',
],
},
extend: {
boxShadow: {
slider: '0 0 0 5px rgba(0, 0, 0, 0.3)',
toast:
'hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px',
menu: '0 2px 10px rgba(0, 0, 0, 0.14)',
},
keyframes: {
// 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)' },
},
// Tooltip
'slide-up-fade': {
'0%': { opacity: 0, transform: 'translateY(2px)' },
'100%': { opacity: 1, transform: 'translateY(0)' },
},
'slide-right-fade': {
'0%': { opacity: 0, transform: 'translateX(-2px)' },
'100%': { opacity: 1, transform: 'translateX(0)' },
},
'slide-down-fade': {
'0%': { opacity: 0, transform: 'translateY(-2px)' },
'100%': { opacity: 1, transform: 'translateY(0)' },
},
'slide-left-fade': {
'0%': { opacity: 0, transform: 'translateX(2px)' },
'100%': { opacity: 1, transform: 'translateX(0)' },
},
// Toast
hide: {
'0%': { opacity: 1 },
'100%': { opacity: 0 },
},
'slide-in': {
from: { transform: `translateX(calc(100% + ${VIEWPORT_PADDING}px))` },
to: { transform: 'translateX(0)' },
},
'swipe-out': {
from: { transform: 'translateX(var(--radix-toast-swipe-end-x))' },
to: { transform: `translateX(calc(100% + ${VIEWPORT_PADDING}px))` },
},
// Navigation menu
'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 },
},
'scale-in-content': {
'0%': { transform: 'rotateX(-30deg) scale(0.9)', opacity: 0 },
'100%': { transform: 'rotateX(0deg) scale(1)', opacity: 1 },
},
'scale-out-content': {
'0%': { transform: 'rotateX(0deg) scale(1)', opacity: 1 },
'100%': { transform: 'rotateX(-10deg) scale(0.95)', opacity: 0 },
},
'fade-in': {
'0%': { opacity: 0 },
'100%': { opacity: 1 },
},
'fade-out': {
'0%': { opacity: 1 },
'100%': { opacity: 0 },
},
},
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)',
'slide-up': 'slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1)',
// Tooltip
'slide-up-fade': 'slide-up-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)',
'slide-right-fade':
'slide-right-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)',
'slide-down-fade': 'slide-down-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)',
'slide-left-fade': 'slide-left-fade 0.4s cubic-bezier(0.16, 1, 0.3, 1)',
// Toast
'slide-in': 'slide-in 150ms cubic-bezier(0.16, 1, 0.3, 1)', // open
hide: 'hide 100ms ease-in forwards', // closed
'swipe-out': '100ms ease-out forwards', // end
// 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',
'scale-in-content': 'scale-in-content 0.2s ease',
'scale-out-content': 'scale-out-content 0.2s ease',
'fade-in': 'fade-in 0.2s ease',
'fade-out': 'fade-out 0.2s ease',
},
},
},
plugins: [
require('@tailwindcss/typography'),
require('@tailwindcss/forms'),
require('@tailwindcss/line-clamp'),
require('tailwindcss-radix')(),
],
}