-
Notifications
You must be signed in to change notification settings - Fork 2
/
uno.config.ts
50 lines (49 loc) · 1.44 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
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
presetWebFonts,
} from 'unocss'
import type { IconifyJSON } from '@iconify/types'
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
import { IconClasses } from './src/config/icons'
export default defineConfig({
safelist: IconClasses,
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
collections: {
'carbon': () => import('@iconify-json/carbon/icons.json').then(i => i.default as IconifyJSON),
'devicon': () => import('@iconify-json/devicon/icons.json').then(i => i.default as IconifyJSON),
'file-icons': () => import('@iconify-json/file-icons/icons.json').then(i => i.default as IconifyJSON),
'logos': () => import('@iconify-json/logos/icons.json').then(i => i.default as IconifyJSON),
'simple-icons': () => import('@iconify-json/simple-icons/icons.json').then(i => i.default as IconifyJSON),
'custom': FileSystemIconLoader(
'./src/assets/icons',
svg => svg.replace(/#fff/, 'currentColor'),
),
},
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
},
}),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
theme: {
dark: {
bg: {
dark: '#1a1a1a',
},
},
},
})