-
Notifications
You must be signed in to change notification settings - Fork 2
/
uno.config.ts
69 lines (67 loc) · 1.79 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
import presetRemToPx from '@unocss/preset-rem-to-px'
import transformerAttributifyJsx from '@unocss/transformer-attributify-jsx'
import {
defineConfig,
presetUno,
presetAttributify,
presetIcons,
presetTypography,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
Rule,
} from 'unocss'
const customRules: Rule[] = [
['font-size-s', { 'font-size': '12px' }],
['font-size-m', { 'font-size': '14px' }],
['font-size-l', { 'font-size': '16px' }],
['color-shallowblack', { color: '#3d3d3d' }],
['color-deepgrey', { color: '#858585' }],
['color-primary', { color: '#0090F0' }],
['color-primary', { color: '#0090F0' }],
['bg-normal', { background: '#f5f5f5' }],
['bg-light', { background: '#f8f8f8' }],
['bg-deepgrey', { background: '#858585' }],
['bg-normalgrey', { background: '#c0c0c0' }],
['b-deepgrey', { 'border-color': '#858585' }],
]
export default defineConfig({
presets: [
presetRemToPx(),
presetUno(),
presetAttributify(),
presetIcons({
collections: {
carbon: () => import('@iconify-json/mdi').then((i) => i.icons),
},
}),
presetTypography(),
presetWebFonts(),
],
transformers: [transformerAttributifyJsx(), transformerDirectives(), transformerVariantGroup()],
rules: customRules,
theme: {
extend: {
keyframes: {
spin: {
'0%': { transform: 'rotate(0deg)' },
'100%': { transform: 'rotate(360deg)' },
},
'float-up': {
'0%': {
opacity: 0,
transform: 'translateY(50%)',
},
'100%': {
opacity: 1,
transform: 'translateY(0)',
},
},
},
animation: {
spin: 'spin 1s linear infinite',
'float-up': 'float-up 0.3s forwards',
},
},
},
})