-
Notifications
You must be signed in to change notification settings - Fork 0
/
tailwind.config.ts
93 lines (91 loc) · 3.71 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
import { type Config } from 'tailwindcss';
import plugin from 'tailwindcss/plugin';
const config = {
darkMode: ['class'],
content: ['./src/**/*.tsx', './.storybook/preview.tsx'],
theme: {
colors: {
// foreground
textBody: 'rgb(var(--text-body) / <alpha-value>)',
textDescription: 'rgb(var(--text-description) / <alpha-value>)',
textLink: 'rgb(var(--text-link) / <alpha-value>)',
textOnFill: 'rgb(var(--text-on-fill) / <alpha-value>)',
textHighlight: 'rgb(var(--text-highlight) / <alpha-value>)',
textError: 'rgb(var(--text-error) / <alpha-value>)',
textSuccess: 'rgb(var(--text-success) / <alpha-value>)',
textWarning: 'rgb(var(--text-warning) / <alpha-value>)',
textInfo: 'rgb(var(--text-info) / <alpha-value>)',
// background
bgBase: 'rgb(var(--bg-base) / <alpha-value>)',
bgPrimary: 'rgb(var(--bg-primary) / <alpha-value>)',
bgSecondary: 'rgb(var(--bg-secondary) / <alpha-value>)',
bgTertiary: 'rgb(var(--bg-tertiary) / <alpha-value>)',
bgCodeBlock: 'rgb(var(--bg-code-block) / <alpha-value>)',
bgError: 'rgb(var(--bg-error) / <alpha-value>)',
bgSuccess: 'rgb(var(--bg-success) / <alpha-value>)',
bgWarning: 'rgb(var(--bg-warning) / <alpha-value>)',
bgInfo: 'rgb(var(--bg-info) / <alpha-value>)',
bgHover: 'rgb(var(--bg-hover) / <alpha-value>)',
bgActive: 'rgb(var(--bg-active) / <alpha-value>)',
bgTransparent: 'var(--bg-transparent)',
bgBackDrop: 'rgb(var(--bg-back-drop))',
// border
borderPrimary: 'rgb(var(--border-primary) / <alpha-value>)',
borderSecondary: 'rgb(var(--border-secondary) / <alpha-value>)',
borderFocus: 'rgb(var(--border-focus) / <alpha-value>)',
borderDisabled: 'rgb(var(--border-disabled) / <alpha-value>)',
borderError: 'rgb(var(--border-error) / <alpha-value>)',
borderSuccess: 'rgb(var(--border-success) / <alpha-value>)',
borderWarning: 'rgb(var(--border-warning) / <alpha-value>)',
borderInfo: 'rgb(var(--border-info) / <alpha-value>)',
borderTransparent: 'var(--border-transparent)',
// button
buttonPrimary: 'rgb(var(--button-primary) / <alpha-value>)',
buttonHover: 'rgb(var(--button-hover) / <alpha-value>)',
buttonActive: 'rgb(var(--button-active) / <alpha-value>)',
// chart
chartPrimary: 'rgb(var(--chart-primary) / <alpha-value>)',
chartEmpty: 'rgb(var(--chart-empty) / <alpha-value>)',
// group
groupPrimary: 'rgb(var(--group-primary) / <alpha-value>)',
groupSecondary: 'rgb(var(--group-secondary) / <alpha-value>)',
groupTertiary: 'rgb(var(--group-tertiary) / <alpha-value>)',
groupQuaternary: 'rgb(var(--group-quaternary) / <alpha-value>)',
},
extend: {
fontFamily: {
notoSansJp: ['var(--font-noto-sans-jp)'],
},
aria: {
invalid: 'invalid="true"',
},
maxHeight: {
lg: '32rem',
},
},
},
plugins: [
plugin(({ matchUtilities, theme }) => {
matchUtilities(
{
'grid-cols-auto-fill': (value) => ({
gridTemplateColumns: `repeat(auto-fill, minmax(min(${value}, 100%), 1fr))`,
}),
'grid-cols-auto-fit': (value) => ({
gridTemplateColumns: `repeat(auto-fit, minmax(min(${value}, 100%), 1fr))`,
}),
'grid-rows-auto-fill': (value) => ({
gridTemplateRows: `repeat(auto-fill, minmax(min(${value}, 100%), 1fr))`,
}),
'grid-rows-auto-fit': (value) => ({
gridTemplateRows: `repeat(auto-fit, minmax(min(${value}, 100%), 1fr))`,
}),
},
{
values: theme('width', {}),
},
);
}),
],
} satisfies Config;
export default config;