forked from antfu/antfu.me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unocss.config.ts
43 lines (42 loc) · 1.1 KB
/
unocss.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
import { defineConfig, presetAttributify, presetIcons, presetUno, presetWebFonts, transformerDirectives } from 'unocss'
export default defineConfig({
shortcuts: [
{
'bg-base': 'bg-white dark:bg-black',
'color-base': 'text-black dark:text-white',
'border-base': 'border-[#8884]',
},
[/^btn-(\w+)$/, ([_, color]) => `op50 px2.5 py1 transition-all duration-200 ease-out no-underline! hover:(op100 text-${color} bg-${color}/10) border border-base! rounded`],
],
rules: [
[/^slide-enter-(\d+)$/, ([_, n]) => ({
'--enter-stage': n,
})],
],
presets: [
presetIcons({
extraProperties: {
'display': 'inline-block',
'height': '1.2em',
'width': '1.2em',
'vertical-align': 'text-bottom',
},
}),
presetAttributify(),
presetUno(),
presetWebFonts({
fonts: {
sans: 'Inter:400,600,800',
mono: 'DM Mono:400,600',
condensed: 'Roboto Condensed',
wisper: 'Bad Script',
},
}),
],
transformers: [
transformerDirectives(),
],
safelist: [
'i-ri-menu-2-fill',
],
})