-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
137 lines (123 loc) · 3.99 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
import './configs/tw-css-plugin'
import { getIconCollections, iconsPlugin } from '@egoist/tailwindcss-icons'
import plugin from 'tailwindcss/plugin'
import resolveConfig from 'tailwindcss/resolveConfig'
/** @type {import('tailwindcss').Config} */
export default resolveConfig({
darkMode: ['class', '[data-theme="dark"]'],
content: ['./entrypoints/**/*.{ts,tsx}', './src/**/*.{tsx,tsx}'],
prefix: '',
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
fontFamily: {
theme: 'var(--fo-font-family)',
default: 'SN pro, sans-serif, system-ui',
},
cursor: {
button: 'var(--cursor-button)',
select: 'var(--cursor-select)',
checkbox: 'var(--cursor-checkbox)',
link: 'var(--cursor-link)',
menu: 'var(--cursor-menu)',
radio: 'var(--cursor-radio)',
switch: 'var(--cursor-switch)',
card: 'var(--cursor-card)',
},
colors: {
border: 'hsl(var(--border) / <alpha-value>)',
background: 'hsl(var(--background) / <alpha-value>)',
foreground: 'hsl(var(--foreground) / <alpha-value>)',
destructive: {
DEFAULT: 'hsl(var(--destructive) / <alpha-value>)',
foreground: 'hsl(var(--destructive-foreground) / <alpha-value>)',
},
muted: {
DEFAULT: 'hsl(var(--muted) / <alpha-value>)',
foreground: 'hsl(var(--muted-foreground) / <alpha-value>)',
},
accent: 'hsl(var(--fo-a) / <alpha-value>)',
popover: {
DEFAULT: 'hsl(var(--popover) / <alpha-value>)',
foreground: 'hsl(var(--popover-foreground) / <alpha-value>)',
},
card: {
DEFAULT: 'hsl(var(--card) / <alpha-value>)',
foreground: 'hsl(var(--card-foreground) / <alpha-value>)',
},
native: {
DEFAULT: 'hsl(var(--fo-native) / <alpha-value>)',
active: 'hsl(var(--fo-native-active) / <alpha-value>)',
},
theme: {
// https://uicolors.app/create
accent: {
DEFAULT: 'hsl(var(--fo-a) / <alpha-value>)',
50: '#fff7ec',
100: '#ffeed3',
200: '#ffd9a5',
300: '#ffbd6d',
400: '#ff9532',
500: '#ff760a',
600: '#ff5c00',
700: '#cc4102',
800: '#a1330b',
900: '#822c0c',
950: '#461304',
},
vibrancyFg: 'hsl(var(--fo-vibrancy-foreground) / <alpha-value>)',
vibrancyBg: 'var(--fo-vibrancy-background)',
item: {
active: 'var(--fo-item-active)',
hover: 'var(--fo-item-hover)',
},
inactive: 'hsl(var(--fo-inactive) / <alpha-value>)',
disabled: 'hsl(var(--fo-disabled) / <alpha-value>)',
foreground: 'hsl(var(--fo-text-primary) / <alpha-value>)',
background: 'var(--fo-background)',
'foreground-hover':
'hsl(var(--fo-text-primary-hover) / <alpha-value>)',
modal: {
background: 'var(--fo-modal-background)',
'background-opaque': 'var(--fo-modal-background-opaque)',
},
button: {
hover: 'var(--fo-button-hover)',
},
},
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
},
},
plugins: [
iconsPlugin({
collections: {
...getIconCollections(['mingcute']),
},
}),
require('tailwindcss-animate'),
require('@tailwindcss/container-queries'),
require('./tailwind-extend.css'),
plugin(({ addVariant }) => {
addVariant('f-motion-reduce', '[data-motion-reduce="true"] &')
addVariant(
'group-motion-reduce',
':merge(.group)[data-motion-reduce="true"] &',
)
addVariant(
'peer-motion-reduce',
':merge(.peer)[data-motion-reduce="true"] ~ &',
)
}),
],
})