dcasia / mini-program-tailwind

让你的小程序用上原汁原味的 Tailwind/Windi CSS
https://www.craft.do/s/Wx2f9cjGwyZYOx
489 stars 40 forks source link

hover-class中的 !类名 不生效 #96

Open rapiz1 opened 1 year ago

rapiz1 commented 1 year ago

微信 button 等元素支持 hover-class,在点时runtime会自动在class中加上hover-class中的内容。我使用 hover-class="!bg-black" 无效,类名被正确添加,但style没有变化,看起来是对应的样式没有被生成。是否应该增加对hover-class的扫描?

如果我自己写 .selector {background: black !important} 则可以生效

rapiz1 commented 1 year ago

查看编译结果发现,生成的类名是 -i-bg-black,但小程序runtime添加的类名是 !bg-black。我同时书写 -i-bg-black !bg-black则可以工作