sonofmagic / weapp-tailwindcss

bring tailwindcss to weapp ! 把 `tailwindcss` 原子化思想带入小程序开发吧 ! 原 `weapp-tailwindcss-webpack-plugin`
https://weapp-tw.icebreaker.top
MIT License
1.12k stars 82 forks source link

:hover 丢失 #293

Closed s97712 closed 2 months ago

s97712 commented 2 months ago

描述这个Bug 设置完 injectAdditionalCssVarScope 选项之后,所有的:hover 伪类都丢失了。

      chain.merge({
          plugin: {
            install: {
              plugin: UnifiedWebpackPluginV5,
              args: [{
                appType: 'taro',
                injectAdditionalCssVarScope: true,
              }],
            }
          }
        })

运行环境

sonofmagic commented 2 months ago

你这是在小程序平台吗?小程序本身就是没有 :hover 的,要用标签的 hover-class 替代 https://developers.weixin.qq.com/miniprogram/dev/component/view.html

sonofmagic commented 2 months ago

当然,你想要在小程序端,保留 :hover 的话,你可以给插件传入一个 cssRemoveHoverPseudoClass: false 配置项 但是,,小程序端 css 里面写 :hover 是没有用的哈。