-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathunocss.config.js
43 lines (42 loc) · 1.1 KB
/
unocss.config.js
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
/*
* @LastEditTime: 2023-06-26 04:35:43
* @Description: unocss 配置
* @Date: 2023-06-26 04:22:50
* @Author: isboyjc
* @LastEditors: isboyjc
*/
import { presetAttributify, presetUno, defineConfig } from "unocss";
// Unocss 指令插件
import transformerDirectives from '@unocss/transformer-directives'
// 变体组 指令插件
// 使用: <div class="hover:(bg-gray-400 font-medium) font-(light mono)"/>
// 转化: <div class="hover:bg-gray-400 hover:font-medium font-light font-mono"/>
import transformerVariantGroup from '@unocss/transformer-variant-group'
export default defineConfig({
// 快捷方式
shortcuts: {
// 'border-main': 'border-gray-400 border-opacity-30',
// 'bg-main': 'bg-gray-400',
// 'bg-base': 'bg-white dark:bg-hex-1a1a1a',
},
presets: [
presetUno(),
presetAttributify({
prefix: 'uno-',
prefixedOnly: true, // <--
})
],
// 主题
theme: {
colors: {
primary: '#3eaf7c',
},
fontFamily: {
mono: 'var(--vt-font-family-mono)',
},
},
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
})