-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuno.config.mts
More file actions
85 lines (83 loc) · 2.48 KB
/
uno.config.mts
File metadata and controls
85 lines (83 loc) · 2.48 KB
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
import extractorMdc from '@unocss/extractor-mdc'
import {
defineConfig,
presetAttributify,
presetIcons,
presetMini,
presetTagify,
presetTypography,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import contacts from './docs/.vitepress/theme/src/contacts.json' with { type: 'json' }
import safeIcon from './docs/.vitepress/theme/src/safeIcon.json' with { type: 'json' }
const safeIcons = [
...contacts.map(c => c.iconUno),
...safeIcon.appIcons,
]
const safeColors = contacts.map(c => c.colorUno)
export default defineConfig({
theme: {
breakpoints: {
sm: '600px',
md: '900px',
},
},
rules: [
['font-sans', { 'font-family': 'LXGW Neo ZhiSong Plus' }],
['font-serif', { 'font-family': 'YshiPen-ShutiTC' }],
['font-mono', { 'font-family': 'LXGW Bright Code TC' }],
['font-stylish', { 'font-family': 'Caveat' }],
['font-script', { 'font-family': 'Ephesis' }],
],
safelist: [
...safeIcons,
...safeColors.map(c => `border-${c}-500`),
...safeColors.map(c => `text-${c}-500`),
...safeColors.map(c => `hover:text-${c}-500`),
],
content: {
pipeline: {
include: [
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html|css)($|\?)/,
],
},
},
shortcuts: {
'page-content': 'mx-auto max-w-[800px] block px-10 min-w-0',
},
presets: [
presetMini(),
presetIcons({
collections: {
carbon: () => import('@iconify-json/carbon/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
ph: () => import('@iconify-json/ph/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
solar: () => import('@iconify-json/solar/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
duo: () => import('@iconify-json/duo-icons/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
simple: () => import('@iconify-json/simple-icons/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
skill: () => import('@iconify-json/skill-icons/icons.json', { with: { type: 'json' } }).then(i => i.default as any),
},
}),
presetAttributify({
strict: true,
prefixedOnly: true,
prefix: 'un-',
}),
presetTagify({
prefix: 'un-',
}),
presetTypography(),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
extractors: [
extractorMdc(),
],
layers: {
default: 0,
components: 1,
utilities: 2,
},
})