File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ import type {
2
+ Preset ,
3
+ } from 'unocss'
1
4
// https://www.npmjs.com/package/@uni -helper/unocss-preset-uni
2
5
import { presetUni } from '@uni-helper/unocss-preset-uni'
6
+
7
+ // @see https://unocss.dev/presets/legacy-compat
8
+ import { presetLegacyCompat } from '@unocss/preset-legacy-compat'
3
9
import {
4
10
defineConfig ,
5
11
presetAttributify ,
@@ -23,6 +29,14 @@ export default defineConfig({
23
29
} ) ,
24
30
// 支持css class属性化
25
31
presetAttributify ( ) ,
32
+ // TODO: check 是否会有别的影响
33
+ // 处理低端安卓机的样式问题
34
+ // 将颜色函数 (rgb()和hsl()) 从空格分隔转换为逗号分隔,更好的兼容性app端,example:
35
+ // `rgb(255 0 0)` -> `rgb(255, 0, 0)`
36
+ // `rgba(255 0 0 / 0.5)` -> `rgba(255, 0, 0, 0.5)`
37
+ presetLegacyCompat ( {
38
+ commaStyleColorFunction : true ,
39
+ } ) as Preset ,
26
40
] ,
27
41
transformers : [
28
42
// 启用指令功能:主要用于支持 @apply、@screen 和 theme() 等 CSS 指令
You can’t perform that action at this time.
0 commit comments