-
Notifications
You must be signed in to change notification settings - Fork 1
/
uno.config.js
42 lines (41 loc) · 1.01 KB
/
uno.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
import { presetUno, presetAttributify, e } from 'unocss';
import presetIcons from '@unocss/preset-icons';
import themeOverrides from './naive-ui-theme-overrides.json';
export default {
presets: [
presetAttributify({
prefix: 'un-',
prefixedOnly: false
}),
presetUno(),
presetIcons({
prefix: 'i-'
})
],
theme: {
colors: {
primary: {
DEFAULT: themeOverrides.common.primaryColor,
lighten: themeOverrides.common.primaryColorHover,
darken: themeOverrides.common.primaryColorPressed
}
}
},
rules: [
[
/^grid-layout-(\d+)(\/(\d+(.*)))?$/,
([, row, , gap, gapUnit]) => {
return {
display: 'grid',
'grid-gap': `${gap ?? '36'}${gapUnit ? '' : 'px'}`,
'grid-template-columns': `repeat(${row}, minmax(0, 1fr))`
};
},
{ layer: 'components' }
]
],
shortcuts: {
'column-layout': 'flex flex-col border border-dashed p-3 my-3',
'flex-VC': 'flex items-center'
}
};