taro-plugin-tailwind icon indicating copy to clipboard operation
taro-plugin-tailwind copied to clipboard

微信下带反斜杠的推导样式不可用

Open transtone opened this issue 4 years ago • 5 comments

https://cn.windicss.org/features/value-auto-infer.html

windicss的很重要功能,自动值推导,因为wxss不支持反斜杠而无法使用。比如 bg-[#eee],

image

有什么方案没有?

ps:背景可以用 bg-hex-eee 来解决。但 important !text-20px 用不了很郁闷。

transtone avatar Sep 18 '21 01:09 transtone

🥲 本质上还是 wxss 不支持转义符的问题,auto-infer 以及其它有用到转义符的语法应该都是无解的。有其它解决方案的朋友可以讨论讨论。

pcdotfan avatar Sep 19 '21 03:09 pcdotfan

通过webpack,将特定的字符转义呢,或者像处理 1/2 宽度一样,用特定字符代替原定字符?

https://github.com/windicss/windicss-webpack-plugin/issues/95

transtone avatar Sep 19 '21 09:09 transtone

https://github.com/dcasia/wechat-mini-program-tailwind

这个项目用了webpack处理,可以支持原始的windicss写法。

transtone avatar Apr 28 '22 11:04 transtone

感谢,我周末研究一下

pcdotfan avatar Apr 28 '22 12:04 pcdotfan

https://github.com/dcasia/wechat-mini-program-tailwind/issues/5 已经可以用了。

mefengl avatar May 12 '22 09:05 mefengl