-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
89 lines (89 loc) · 2.12 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// uno.config.ts
import presetRemToPx from '@unocss/preset-rem-to-px';
import { defineConfig, presetUno } from 'unocss';
export default defineConfig({
presets: [
presetUno(),
presetRemToPx({ baseFontSize: 4 }),
// ...custom presets
],
rules: [
['b', { 'font-weight': 'bold' }],
[
'flex-column',
{
display: 'flex',
'flex-direction': 'column',
},
],
[
'flex-column-between',
{
display: 'flex',
'flex-direction': 'column',
'justify-content': 'space-between',
},
],
[
'flex-column-around',
{
display: 'flex',
'flex-direction': 'column',
'justify-content': 'space-around',
},
],
[
'flex-space-around',
{
display: 'flex',
'flex-direction': 'row',
'justify-content': 'space-around',
'align-content': 'center',
'align-items': 'center',
},
],
[
'flex-space-between',
{
display: 'flex',
'flex-direction': 'row',
'justify-content': 'space-between',
'align-content': 'center',
'align-items': 'center',
},
],
['bg-size-full', { 'background-size': '100% 100%' }],
[
/^text-line-([\d]+)$/,
([_a, num]) => ({
'word-break': 'break-all',
overflow: 'hidden',
'text-overflow': 'ellipsis',
display: '-webkit-box',
'-webkit-box-orient': 'vertical',
/*! autoprefixer: off */
'-webkit-line-clamp': `${num}`,
}),
],
[/^fs-([\d]+)$/, ([_, num]) => ({ 'font-size': `${num}px` })],
[/^flex([\d]+)$/, ([_, num]) => ({ flex: `${num}` })],
],
shortcuts: {
'flex-center':
'flex flex-justify-center flex-content-center flex-items-center',
'flex-middle': 'flex flex-items-center',
'flex-y-center': 'flex-items-center',
},
content: {
pipeline: {
include: [
// the default
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
// include js/ts files
'src/**/*.{js,ts}',
],
// exclude files
// exclude: []
},
},
});