diff --git a/uno.config.ts b/uno.config.ts index 84c0073..9a8bfa8 100755 --- a/uno.config.ts +++ b/uno.config.ts @@ -35,10 +35,25 @@ export default defineConfig({ }, ], shortcuts: [ - { - 'flex-center': 'flex justify-center items-center', - 'flex-col-center': 'flex flex-col justify-center items-center', - }, + [/^flex-?(col)?-(start|end|center|baseline|stretch)-?(start|end|center|between|around|evenly|left|right)?$/, ([, col, items, justify]) => { + const cls = ['flex'] + if (col === 'col') { + cls.push('flex-col') + } + if (items === 'center' && !justify) { + cls.push('items-center') + cls.push('justify-center') + } + else { + cls.push(`items-${items}`) + if (justify) { + cls.push(`justify-${justify}`) + } + } + return cls.join(' ') + }], + [/^square-\[?(.*?)\]?$/, ([, size]) => `w-${size} h-${size}`], + [/^circle-\[?(.*?)\]?$/, ([, size]) => `square-${size} rounded-full`], ], preflights: [ {