-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathuno.config.ts
More file actions
55 lines (54 loc) 路 2.3 KB
/
Copy pathuno.config.ts
File metadata and controls
55 lines (54 loc) 路 2.3 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
import { defineConfig, presetIcons, presetWind3, transformerDirectives, transformerVariantGroup } from 'unocss'
export default defineConfig({
details: true,
presets: [
presetWind3({
dark: 'class',
}),
presetIcons({
collections: {
'mingcute': () => import('@iconify-json/mingcute/icons.json').then(i => i.default),
'icon-park-twotone': () => import('@iconify-json/icon-park-twotone/icons.json').then(i => i.default),
'fancy-controller': () => import('fancy-controller/icons.json').then(i => i.default),
},
}),
],
// The default pipeline only scans .vue/.tsx-style files; include plain .ts/.js
// too so icon classes declared in shared TS maps (e.g. buttonMappingLayout.ts)
// are detected and generated. This mirrors UnoCSS's default include list (kept
// in sync, incl. vine.ts/marko) with `[jt]sx?` widened to also match .ts/.js.
content: {
pipeline: {
include: [/\.(vue|svelte|[jt]sx?|vine\.ts|mdx?|astro|elm|php|phtml|marko|html)($|\?)/],
},
},
transformers: [transformerVariantGroup(), transformerDirectives()],
theme: {
colors: {
primary: {
light: '#e8effb',
DEFAULT: '#2f81f7',
dark: '#071f40',
},
},
fontFamily: {
mono: ['Noto Sans Mono', 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', '"Liberation Mono"', '"Courier New"'],
},
containers: {
sm: '(min-width: 24rem)',
},
},
shortcuts: {
'dou-sc-capsule':
'px-2 lh-1.1em flex-shrink-0 text-primary/80 dou-sc-colorborder rounded-full whitespace-nowrap',
'dou-sc-btn':
'transition bg-transparent dou-sc-colorborder text-primary px-4 py-1 rounded-full transform-gpu flex items-center gap-1 hover:(bg-primary text-white) active:(scale-90) disabled:(filter-grayscale bg-transparent! scale-100! text-primary! cursor-not-allowed)',
'dou-sc-container': 'dou-sc-autoborder rounded-32px px-3 py-3',
'dou-sc-autoborder': 'border-1 border-gray-3 dark-border-gray-6',
'dou-sc-colorborder': 'border-1.5 border-primary/20 dark-border-primary/50',
'dou-sc-autobg': 'bg-primary/20 dark-bg-primary/50',
'dou-sc-title': 'text-xl font-bold text-primary lh-1em',
'dou-sc-subtitle': 'text-xl font-bold text-primary lh-1.2em my-2',
'dou-sc-link': 'text-primary hover:underline',
},
})