This repository was archived by the owner on Dec 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunocss.config.ts
75 lines (72 loc) · 1.77 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
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
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
presetWebFonts,
transformerDirectives
} from 'unocss'
// @ts-expect-error - no types exported
import { unocssPreset as devtoolsUIKitUnoPreset } from '@nuxt/devtools-ui-kit/unocss'
export default defineConfig({
shortcuts: [
{
// General Tokens
'bg-base': 'n-bg-base',
'bg-active': 'n-bg-active',
'border-base': 'n-border-base',
'navbar-glass':
'sticky z-10 top-0 backdrop-blur bg-white/70 dark:bg-[#151515]/70',
'n-icon-btn':
'aspect-1/1 w-1.6em h-1.6em flex items-center justify-center rounded op50 hover:op100 hover:bg-active',
// Reusable
'x-divider': 'h-1px w-full bg-gray/15'
},
[
/^theme-banner-(\w+)$/,
$ => `p2 flex gap2 items-center rounded bg-${$[1]}:5 text-${$[1]}6`
],
[
/^theme-card-(\w+)$/,
$ =>
`p2 flex gap2 items-center rounded min-w-40 min-h-30 justify-center transition-all saturate-0 bg-gray/10 op50 hover:(op100 bg-${$[1]}/10 text-${$[1]}6 saturate-100)`
]
],
theme: {
colors: {
primary: '#03ae67'
}
},
presets: [
presetUno(),
presetAttributify(),
presetIcons({
prefix: ['i-', ''],
scale: 1.2,
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle'
}
}),
presetWebFonts({
fonts: {
sans: 'Inter:400,500',
mono: 'Fira Code'
}
}),
devtoolsUIKitUnoPreset()
],
safelist: [
'carbon-nominal',
'carbon-function',
'carbon-chart-treemap',
'carbon-3d-mpr-toggle',
'carbon-tree-view-alt',
'carbon-information',
'carbon-data-set',
'carbon-layers',
'carbon-cloud',
'carbon-plug'
],
transformers: [transformerDirectives()]
})