-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
32 lines (31 loc) · 1.03 KB
/
uno.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
import { defineConfig, presetAttributify, presetUno } from 'unocss'
import presetRemToPx from '@unocss/preset-rem-to-px'
/**
* @see https://unocss.dev/
*/
export default defineConfig({
presets: [
presetAttributify({
strict: true,
prefixedOnly: true,
}),
],
rules: [
['color-vuetify-warning', { color: 'rgb(var(--v-theme-warning)) !important' }],
[
/^margin(-(start|top|end|bottom))?-(\d+)$/,
([, , direction, level]) => {
const value = `${Number(level) * 4}px !important`
return {
margin: typeof direction === 'undefined' ? value : undefined,
'margin-left': direction === 'start' ? value : undefined,
'margin-right': direction === 'end' ? value : undefined,
'margin-top': direction === 'top' ? value : undefined,
'margin-bottom': direction === 'bottom' ? value : undefined,
}
},
],
[/^pa-(\d+)$/, ([, level]) => ({ padding: `${Number(level) * 4}px !important` })],
],
blocklist: ['container', /^rounded-/],
})