You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
814 B
29 lines
814 B
8 months ago
|
import {
|
||
|
defineConfig,
|
||
|
presetTypography,
|
||
|
presetUno,
|
||
|
transformerVariantGroup,
|
||
|
presetIcons,
|
||
|
} from 'unocss';
|
||
|
|
||
|
export default defineConfig({
|
||
|
/** presetIcons 支持iconify */
|
||
|
presets: [presetUno(), presetTypography(), presetIcons()],
|
||
|
/** 支持这样组合的写法 before:(bg-red w-6px h-6px rounded-full inline-block content-['']) */
|
||
|
transformers: [transformerVariantGroup()],
|
||
|
shortcuts: [
|
||
|
[
|
||
|
/^dot-before-(.*)$/,
|
||
|
([, color]) => {
|
||
|
return `before:(bg-${color} w-6px h-6px rounded-full inline-block content-[''] position-relative top-[-2px] mr-5px) `;
|
||
|
},
|
||
|
],
|
||
|
[
|
||
|
/^dot-after-(.*)$/,
|
||
|
([, color]) => {
|
||
|
return `before:(bg-${color} w-6px h-6px rounded-full inline-block content-[''] position-relative top-[-2px] ml-5px) `;
|
||
|
},
|
||
|
],
|
||
|
],
|
||
|
});
|