-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunocss.config.ts
74 lines (72 loc) · 1.82 KB
/
unocss.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
import {
defineConfig,
presetIcons,
presetUno,
presetWebFonts
} from 'unocss'
import transformerDirectives from '@unocss/transformer-directives'
export default defineConfig({
rules: [
['border-rounded-lg', { 'border-radius': '0.75rem' }],
[/^truncate-(\d+)$/, ([, d]) => ({
'overflow': 'hidden',
'text-overflow': 'ellipsis',
'display': '-webkit-box',
'-webkit-box-orient': 'vertical',
'-webkit-line-clamp': `${d}`
})]
],
shortcuts: {
// shortcuts to multiple utilities
'no-outline': 'decoration-none outline-none link-color-inherit hover-color-inherit visited-color-inherit active-color-inherit',
'btn': 'text-white bg-primary border-rd-2 px-6 py-2 fw-500'
},
presets: [
presetUno(),
presetIcons({
customizations: {
iconCustomizer(collection, icon, props) {
props.width = '24px'
props.height = '24px'
}
}
}),
presetWebFonts({
provider: 'google', // default provider
fonts: {
// these will extend the default theme
sans: 'Roboto'
}
})
],
transformers: [
transformerDirectives()
],
theme: {
colors: {
'primary': '#5a69e6',
'primary-light': '#9faaf1',
'primary-dark': '#242854',
'alert': '#c91c00',
'success': '#217645',
'warning': '#9e5400',
'info': '#1068bf',
'alert-light': '#fcf1ef',
'success-light': '#ecf4ee',
'warning-light': '#fdf1dd',
'info-light': '#e9f3fc',
'grey-1': '#eeeeee',
'grey-2': '#dddddd',
'grey-3': '#cccccc',
'grey-4': '#999999',
'grey-5': '#666666',
'silver': '#cccccc',
// Do not use anymore
'secondary': '#dfe3f7',
'lightgrey': '#eeeeee',
'darkgrey': '#666666',
'grey': '#999999',
'orange': '#f77f00'
}
}
})