-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
35 lines (34 loc) · 958 Bytes
/
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
import { defineConfig } from 'unocss'
export default defineConfig({
rules: [
[/^bg-color-([a-z\d]+)$/, ([_, value]) => ({ 'background-color': `#${value}` })],
[/^color-([a-z\d]+)$/, ([_, value]) => ({ color: `#${value}` })],
[/^fs-(\d+px)$/, ([_, value]) => ({ 'font-size': value })],
[
/^ellipsis$/,
() => ({
overflow: 'hidden',
'white-space': 'nowrap',
'text-overflow': 'ellipsis',
}),
],
[
/^ellipsis-(\d+)$/,
([_, lines]) => ({
display: '-webkit-box',
overflow: 'hidden',
'text-overflow': 'ellipsis',
'-webkit-line-clamp': lines,
'-webkit-box-orient': 'vertical',
'line-break': 'anywhere',
}),
],
],
shortcuts: {
'h-s-screen': 'h-100svh',
'w-s-screen': 'w-100svw',
'wh-full': 'h-full w-full',
'wh-s-screen': 'h-s-screen w-s-screen',
transparent: 'bg-transparent border-transparent',
},
})