Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 daisyui 在小程序里面 wxss 编译错误 #273

Open
luoshuaidev opened this issue Jan 26, 2024 · 2 comments
Open

使用 daisyui 在小程序里面 wxss 编译错误 #273

luoshuaidev opened this issue Jan 26, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@luoshuaidev
Copy link

使用 daisyui 在小程序里面会得到如下错误

[ WXSS 文件编译错误] 
ERR: wxss GetCompiledResult: ./app.wxss(262:43): error at token `[`
(env: Windows,mp,1.06.2310080; lib: 3.3.2)

看起来是 daisyui 生成的 class 小程序不支持, 请问有没有什么方法让 daisyui 生成的 class 经过 weapp-tailwindcss 处理一下, 让小程序也支持

@luoshuaidev luoshuaidev added the enhancement New feature or request label Jan 26, 2024
@sonofmagic
Copy link
Owner

daisyui 是 tailwindcss 中最流行的纯 CSS 框架,然而它作用的平台只有 h5,直接在小程序中使用会报错,因为小程序的 CSS 选择器有很多限制,无法像 h5 那样自由。
我之前写过一篇文章 https://juejin.cn/post/7307471540715651083
里面就是在微信小程序里面使用 daisyui 的一个思路

也就是 https://ui.icebreaker.top/zh-CN/presets/weapp

不过最近暂时没有维护这个了,打算把它转变成一个组织一起共建。

@luoshuaidev
Copy link
Author

大佬真是太强了89822D38AB234E4A2EC1836C3E79B89E

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants