-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuno.config.ts
More file actions
36 lines (34 loc) · 1.04 KB
/
uno.config.ts
File metadata and controls
36 lines (34 loc) · 1.04 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
import type {
Preset,
} from 'unocss'
import { presetUni } from '@uni-helper/unocss-preset-uni'
import { presetLegacyCompat } from '@unocss/preset-legacy-compat'
import {
defineConfig,
presetIcons,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export default defineConfig({
presets: [
presetUni(),
presetIcons({
scale: 1.2,
warn: true,
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
},
// HBuilderX 必须针对要使用的 Collections 做异步导入
// collections: {
// carbon: () => import('@iconify-json/carbon/icons.json').then(i => i.default),
// },
}),
presetLegacyCompat({
commaStyleColorFunction: true,
legacyColorSpace: true,
// 建议在 presetLegacyCompat 中添加 legacyColorSpace: true,以去除生成的颜色样式中的 in oklch 关键字,现在发现有些渐变色生成不符合预期
}) as Preset,
],
transformers: [transformerDirectives(), transformerVariantGroup()],
})