-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
47 lines (45 loc) · 1.54 KB
/
tailwind.config.js
File metadata and controls
47 lines (45 loc) · 1.54 KB
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
/** @type {import('tailwindcss').Config} */
function withOpacity(variableName) {
return ({ opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(${variableName}), ${opacityValue})`;
}
return `rgb(var(${variableName}))`;
};
}
module.exports = {
content: ['./src/**/*.{js,jsx,ts,tsx}'],
darkMode: 'class', // false, media or class
theme: {
extend: {
transitionProperty: {
'opacity-visibility': 'opacity, visibility',
'opacity-visibility-transform': 'opacity, visibility, transform',
'max-height': 'max-height'
},
colors: {
primary: withOpacity('--x-primary'),
'primary-dark': withOpacity('--x-primary-dark'),
accent: withOpacity('--x-accent')
},
keyframes: {
'slide-left': {
from: { opacity: '0', transform: 'translateX(100px)' },
to: { opacity: '1', transform: 'translateX(0)' }
},
fade: {
from: { opacity: '0' },
to: { opacity: '1' }
}
},
animation: {
toast: 'slide-left .3s forwards',
fade: 'fade .3s forwards'
},
dropShadow: {
box: ['rgb(0 0 0 / 20%) 0px 2px 1px -1px', 'rgb(0 0 0 / 14%) 0px 1px 1px 0px', 'rgb(0 0 0 / 12%) 0px 1px 3px 0px;']
}
}
},
plugins: []
};