Skip to content

Commit

Permalink
Merge branch 'demo'
Browse files Browse the repository at this point in the history
  • Loading branch information
codercup2 committed Apr 12, 2024
2 parents ed79ee1 + 058e3c5 commit 7664f85
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
transformerAttributify,
} from 'unocss-applet'

import legacyCompat from '@unocss/preset-legacy-compat'
// @see https://unocss.dev/presets/legacy-compat
import presetLegacyCompat from '@unocss/preset-legacy-compat'

const isH5 = process.env?.UNI_PLATFORM === 'h5'
const isMp = process.env?.UNI_PLATFORM?.startsWith('mp') ?? false
Expand Down Expand Up @@ -46,10 +47,12 @@ export default defineConfig({
'vertical-align': 'middle',
},
}),
// 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔,更好的兼容性app端 rgb(255 0 0) -> rgb(255, 0, 0)
legacyCompat({
// 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔,更好的兼容性app端,example:
// `rgb(255 0 0)` -> `rgb(255, 0, 0)`
// `rgba(255 0 0 / 0.5)` -> `rgba(255, 0, 0, 0.5)`
presetLegacyCompat({
commaStyleColorFunction: true,
}),
}) as Preset,
],
/**
* 自定义快捷语句
Expand Down

0 comments on commit 7664f85

Please sign in to comment.