-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
43 lines (36 loc) · 1.25 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
/**
* The instant on-demand atomic CSS engine.
* @see https://github.com/unocss/unocss
*/
import { defineConfig } from 'unocss';
import type { Rule, StaticRule } from '@unocss/core';
// https://github.com/action-hong/unocss-preset-scrollbar
// https://github.com/reslear/unocss-preset-scrollbar-hide
interface Theme {
flex?: Record<string, string>;
}
const flex: Rule<Theme>[] = [
['flex', { display: 'flex' }],
['flex-row', { 'flex-direction': 'row' }],
['flex-col', { 'flex-direction': 'column' }],
];
const alignments: StaticRule[] = [
['items-start', { 'align-items': 'flex-start' }],
['items-end', { 'align-items': 'flex-end' }],
['items-center', { 'align-items': 'center' }],
['items-stretch', { 'align-items': 'stretch' }],
];
const justifies: StaticRule[] = [
['justify-start', { 'justify-content': 'flex-start' }],
['justify-end', { 'justify-content': 'flex-end' }],
['justify-center', { 'justify-content': 'center' }],
['justify-between', { 'justify-content': 'space-between' }],
];
const custom: Rule[] = [
['front', { color: '#29c18b !important' }],
['verso', { color: '#fd4772 !important' }],
];
export default defineConfig({
presets: [], // disable default preset
rules: [...flex, ...alignments, ...justifies, ...custom],
});