-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
46 lines (45 loc) · 1001 Bytes
/
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
import { defineConfig, presetIcons, presetUno, transformerDirectives, transformerVariantGroup } from 'unocss'
import extractorSvelte from '@unocss/extractor-svelte'
import { collectionIcons } from './src/lib/icons'
export default defineConfig({
extractors: [
extractorSvelte(),
],
presets: [
presetUno({
dark: 'class',
}),
presetIcons({
warn: true,
scale: 1.2,
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
},
collections: {
vtr: collectionIcons(),
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
variants: [
(matcher) => {
if (!matcher.startsWith('im-'))
return matcher
return {
matcher: matcher.slice(3),
body: (body) => {
body.forEach(v => v[1] && (v[1] += ' !important'))
return body
},
}
},
],
theme: {
colors: {},
},
shortcuts: {},
})