feat: add unocss preset rem to px

This commit is contained in:
张传龙 2023-08-03 17:20:21 +08:00
parent b43f87035b
commit 22c59c208f
3 changed files with 152 additions and 167 deletions

View File

@ -52,6 +52,7 @@
"@commitlint/config-conventional": "^17.6.7",
"@iconify/json": "^2.2.95",
"@iconify/vue": "^4.1.1",
"@unocss/preset-rem-to-px": "^0.54.1",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/compiler-sfc": "^3.3.4",
"@zclzone/eslint-config": "^0.0.4",

315
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
import { defineConfig, presetAttributify, presetUno } from 'unocss'
import presetRemToPx from '@unocss/preset-rem-to-px'
export default defineConfig({
content: {
@ -6,7 +7,7 @@ export default defineConfig({
include: [/\.(vue|svelte|[jt]sx|mdx?|html)($|\?)/],
},
},
presets: [presetUno(), presetAttributify()],
presets: [presetUno(), presetAttributify(), presetRemToPx({ baseFontSize: 4 })],
shortcuts: [
['wh-full', 'w-full h-full'],
['f-c-c', 'flex justify-center items-center'],