-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
60 lines (58 loc) · 1.48 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
import { type Config } from 'tailwindcss';
import { parseColor } from 'tailwindcss/lib/util/color';
import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette';
import plugin from 'tailwindcss/plugin';
export default {
content: [
'./pages/**/*.{jsx,tsx}',
'./components/**/*.{jsx,tsx}',
'./app/**/*.{jsx,tsx}',
],
darkMode: 'selector',
plugins: [
plugin(function ({ matchUtilities, theme }) {
matchUtilities(
{
'text-shadow': value => ({ textShadow: value }),
},
{ values: theme('textShadow') },
);
matchUtilities(
{
'text-shadow': value => {
const { alpha, color } = parseColor(value);
return {
'--tw-text-shadow': `rgb(${color[0]} ${color[1]} ${color[2]}${alpha ? ' / ' + alpha : ''})`,
};
},
},
{ type: 'color', values: flattenColorPalette(theme('colors')) },
);
}),
],
prefix: 'u-',
theme: {
extend: {
boxShadow: {
pop: 'var(--u-shadow-pop-md)',
'pop-md': 'var(--u-shadow-pop-md)',
'pop-sm': 'var(--u-shadow-pop-sm)',
},
fontFamily: {
cc: ['CC font'],
},
fontSize: {
'2xs': ['0.625rem', '1.25rem'],
},
screens: {
xs: '480px',
},
textShadow: {
DEFAULT: '0 1px 1px var(--tw-text-shadow)',
},
transitionDuration: {
DEFAULT: '200ms',
},
},
},
} satisfies Config;