| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,15 +22,30 @@ export default defineConfig<Theme>({ | |||
| 22 | 22 | }, | |
| 23 | 23 | }, | |
| 24 | 24 | shortcuts: [ | |
| 25 | - { | ||
| 26 | - 'flex-center': 'flex justify-center items-center', | ||
| 27 | - 'flex-col-center': 'flex flex-col justify-center items-center', | ||
| 28 | - }, | ||
| 25 | + [/^flex-?(col)?-(start|end|center|baseline|stretch)-?(start|end|center|between|around|evenly|left|right)?$/, ([, col, items, justify]) => { | ||
| 26 | + const cls = ['flex'] | ||
| 27 | + if (col === 'col') { | ||
| 28 | + cls.push('flex-col') | ||
| 29 | + } | ||
| 30 | + if (items === 'center' && !justify) { | ||
| 31 | + cls.push('items-center') | ||
| 32 | + cls.push('justify-center') | ||
| 33 | + } | ||
| 34 | + else { | ||
| 35 | + cls.push(`items-${items}`) | ||
| 36 | + if (justify) { | ||
| 37 | + cls.push(`justify-${justify}`) | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + return cls.join(' ') | ||
| 41 | + }], | ||
| 42 | + [/^square-\[?(.*?)\]?$/, ([, size]) => `w-${size} h-${size}`], | ||
| 43 | + [/^circle-\[?(.*?)\]?$/, ([, size]) => `square-${size} rounded-full`], | ||
| 29 | 44 | ], | |
| 30 | 45 | preflights: [ | |
| 31 | 46 | { | |
| 32 | 47 | getCSS: () => { | |
| 33 | - const returnCss: any = [] | ||
| 48 | + const returnCss: string[] = [] | ||
| 34 | 49 | // 明亮主题 | |
| 35 | 50 | const lightCss = entriesToCss(Object.entries(lightTheme)) | |
| 36 | 51 | const lightRoots = toArray([`*,::before,::after`, `::backdrop`]) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments