-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
76 lines (75 loc) · 1.63 KB
/
uno.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
// unocss.config.ts
import { defineConfig } from 'unocss';
import presetUno from '@unocss/preset-uno';
import type { Theme } from '@unocss/preset-uno';
import presetIcons from '@unocss/preset-icons';
import presetTheme from 'unocss-preset-theme';
import transformerVariantGroup from '@unocss/transformer-variant-group';
import { rules, shortcuts, fontSize } from './uno-rules';
import { darkTheme, lightTheme } from './uno-radix-colors';
import transformerCompileClass from '@unocss/transformer-compile-class';
export default defineConfig<Theme>({
include: [/\.(tsx|mdx|jsx|js|md|astro|html)($|\?)/],
rules,
shortcuts,
safelist: [
'c-sand1',
'c-sand2',
'c-sand3',
'c-sand4',
'c-sand5',
'c-sand6',
'c-sand7',
'c-sand8',
'c-sand9',
'c-sand10',
'c-sand11',
'c-sand12',
'bg-sky3',
'bg-mint3',
'bg-yellow3',
'bg-teal3',
'bg-slate3',
'c-red11',
'c-red12',
'c-violet12',
'c-orange9',
'c-crimson9',
'c-pink9',
'c-plum9',
'c-violet9',
'c-purple9',
'c-indigo9',
'c-tomato11',
'c-crimson11',
'bg-sandA-9',
],
transformers: [transformerVariantGroup(), transformerCompileClass({ classPrefix: 'clx-' })],
theme: {
fontSize,
colors: lightTheme.colors,
breakpoints: {
sm: '40rem',
md: '64rem',
},
},
presets: [
presetUno({
dark: 'class',
variablePrefix: '',
}),
presetIcons({
scale: 1.2,
}),
presetTheme<Theme>({
selectors: {
dark: '.dark',
light: '.light',
},
prefix: '--rdx',
theme: {
dark: darkTheme,
},
}),
],
});