-
Notifications
You must be signed in to change notification settings - Fork 0
/
twind.config.ts
82 lines (81 loc) · 2.54 KB
/
twind.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
import { defineConfig } from '@twind/core';
import presetTailwind from '@twind/preset-tailwind';
import presetTailwindForms from '@twind/preset-tailwind-forms';
import presetExt from '@twind/preset-ext';
export default defineConfig({
presets: [presetTailwind(), presetTailwindForms(), presetExt()],
rules: [
[
'tooltip',
'absolute z-30 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 rounded-lg shadow-sm opacity-0',
],
[
'button',
'inline-flex items-center gap-x-1.5 rounded-md px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 transform hover:scale-105 transition duration-300',
],
],
theme: {
extend: {
colors: {
main: {
DEFAULT: '#85E6C5',
dark: '#8D93D9',
},
alt: {
DEFAULT: '#33BBC5',
dark: '#31398C',
},
asset: {
DEFAULT: '#614BC3',
dark: '#373a57',
},
layout: {
DEFAULT: '#e5ffef',
dark: '#2a2c41',
},
alert: '#f57979',
},
content: [
'./app/helpers/**/*.rb',
'./app/views/**/*.{html,slim,html.slim}',
'./app/frontend/**/*.ts',
'./app/components/**/*.{rb,slim}',
'./node_modules/flowbite/**/*.js',
],
animation: {
enter: 'enter 0.3s',
leave: 'leave 0.3s',
'nav-enter': 'navEnter 0.3s',
'nav-leave': 'navLeave 0.3s',
'notification-enter': 'notificationEnter 0.3s',
'mobile-notification-enter': 'mobileNotificationEnter 0.3s',
},
keyframes: {
enter: {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
leave: {
'0%': { opacity: '1' },
'100%': { opacity: '0' },
},
navEnter: {
'0%': { transform: 'translateX(-100%)' },
'100%': { transform: 'translateX(0)' },
},
navLeave: {
'0%': { transform: 'translateX(0)' },
'100%': { transform: 'translateX(-100%)' },
},
mobileNotificationEnter: {
'0%': { transform: 'translateY(0.5rem)', opacity: '0' },
'100%': { transform: 'translateY(0)', opacity: '100' },
},
notificationEnter: {
'0%': { transform: 'translateY(0) translateX(0.5rem)', opacity: '0' },
'100%': { transform: 'translateX(0)', opacity: '100' },
},
},
},
},
});