-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
tailwind.config.ts
173 lines (166 loc) · 4.98 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
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
import aspectRatioPlugin from '@tailwindcss/aspect-ratio';
import formsPlugin from '@tailwindcss/forms';
import typographyPlugin from '@tailwindcss/typography';
import { type Config } from 'tailwindcss';
import plugin from 'tailwindcss/plugin';
import { parseColorMatrix } from './tailwind/colors.ts';
const blackVariantPlugin = plugin(({ addVariant }) => addVariant('black', '.black.black &'));
const config: Config = {
content: ['./src/**/*.{html,js,ts,tsx}', './custom/instance/**/*.html', './index.html'],
darkMode: 'class',
theme: {
screens: {
sm: '581px',
md: '768px',
lg: '976px',
xl: '1280px',
},
extend: {
boxShadow: ({ theme }) => ({
'3xl': '0 25px 75px -15px rgba(0, 0, 0, 0.25)',
'inset-ring': `inset 0 0 0 2px ${theme('colors.accent-blue')}`,
}),
fontSize: {
base: '0.9375rem',
},
fontFamily: {
arabic: [
'Vazirmatn',
'Cairo',
'Amiri',
'Tajawal',
'sans-serif',
],
javanese: [
'Noto Sans Javanese',
'serif',
],
sans: [
'Inter',
'ui-sans-serif',
'system-ui',
'-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',
],
mono: [
'Roboto Mono',
'ui-monospace',
'mono',
],
emoji: [
'Segoe UI Emoji',
'Segoe UI Symbol',
'Segoe UI',
'Apple Color Emoji',
'Twemoji Mozilla',
'Noto Color Emoji',
'Android Emoji',
],
},
spacing: {
'4.5': '1.125rem',
},
colors: parseColorMatrix({
// Define color matrix (of available colors)
// Colors are configured at runtime with CSS variables in soapbox.json
gray: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
primary: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
secondary: [100, 200, 300, 400, 500, 600],
success: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
danger: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900],
accent: [300, 500],
'accent-blue': true,
'gradient-start': true,
'gradient-end': true,
'greentext': true,
}),
animation: {
'loader-figure': 'loader-figure 1.15s infinite cubic-bezier(0.215, 0.61, 0.355, 1)',
'loader-label': 'loader-label 1.15s infinite cubic-bezier(0.215, 0.61, 0.355, 1)',
fade: 'fade 150ms linear',
'sonar-scale-4': 'sonar-scale-4 3s linear infinite',
'sonar-scale-3': 'sonar-scale-3 3s 0.5s linear infinite',
'sonar-scale-2': 'sonar-scale-2 3s 1s linear infinite',
'sonar-scale-1': 'sonar-scale-1 3s 1.5s linear infinite',
'enter': 'enter 200ms ease-out',
'leave': 'leave 150ms ease-in forwards',
},
keyframes: {
'loader-figure': {
'0%': {
backgroundColor: 'rgb(229, 231, 235)',
width: '0px',
height: '0px',
},
'29%': {
backgroundColor: 'rgb(229, 231, 235)',
},
'30%': {
width: '3rem',
height: '3rem',
backgroundColor: 'transparent',
opacity: '1',
borderWidth: '6px',
},
'100%': {
width: '3rem',
height: '3rem',
borderWidth: '0',
opacity: '0',
backgroundColor: 'transparent',
},
},
'loader-label': {
'0%': { opacity: '0.25' },
'30%': { opacity: '1' },
'100%': { opacity: '0.25' },
},
fade: {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
'sonar-scale-4': {
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(4)' },
},
'sonar-scale-3': {
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(3.5)' },
},
'sonar-scale-2': {
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(3)' },
},
'sonar-scale-1': {
from: { opacity: '0.4', transform: 'scale(1)' },
to: { opacity: '0', transform: 'scale(2.5)' },
},
enter: {
from: { transform: 'scale(0.9)', opacity: '0' },
to: { transform: 'scale(1)', opacity: '1' },
},
leave: {
from: { transform: 'scale(1)', opacity: '1' },
to: { transform: 'scale(0.9)', opacity: '0' },
},
},
},
},
plugins: [
aspectRatioPlugin,
formsPlugin,
typographyPlugin,
blackVariantPlugin,
],
};
export default config;