-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
74 lines (73 loc) · 1.52 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
import { defineConfig, presetIcons, presetUno, presetWebFonts, transformerDirectives, transformerVariantGroup } from 'unocss'
export default defineConfig({
presets: [
presetUno(),
presetIcons(),
presetWebFonts({
provider: 'google',
fonts: {
sans: 'Inter',
mono: 'Ubuntu Mono',
},
}),
],
transformers: [
transformerVariantGroup(),
transformerDirectives(),
],
rules: [
[/^rotate-x-(\d+)$/, ([,d]) => ({
transform: `rotateX(${d}deg)`,
})],
[
'word-break',
{
'word-break': 'normal',
'overflow-wrap': 'anywhere',
},
],
[
'shadow-surround',
{
'box-shadow': '0 0 2px 2px rgb(0 0 0 /0.1)',
},
],
[
/shadow-surround-(sm|md|lg)/,
([,size]) => {
if (size === 'sm') {
return {
'box-shadow': '0 0 2px 1px rgb(0 0 0 /0.1)',
}
}
if (size === 'md') {
return {
'box-shadow': '0 0 4px 2px rgb(0 0 0 /0.1)',
}
}
if (size === 'lg') {
return {
'box-shadow': '0 0 4px 4px rgb(0 0 0 /0.1)',
}
}
},
],
],
shortcuts: [
[
/^divider-(x|y)$/,
([,direction]) => `rounded-0.5 ${direction === 'y' ? 'w-0.5 h-full' : 'h-0.5'}`,
],
],
autocomplete: {
templates: [
'rotate-x-180',
'word-break',
'divider-(x|y)',
'border-surround-<size>',
],
shorthands: {
size: '(sm|md|lg)',
},
},
})