pcdotfan / taro-plugin-tailwind

Taro 接入 tailwindcss 插件
https://taro-ext.jd.com/plugin/view/5fbb3a0799370e09266e2d68
MIT License
134 stars 11 forks source link

升级到 NutUI-3.1.x 之后,全局css样式不生效 #55

Open transtone opened 3 years ago

transtone commented 3 years ago

这些样式虽然可以在 virtual:windi.css 文件中找到,但是并不会对页面元素生效。

/* windicss layer base */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

* {
  --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgba(59, 130, 246, 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
}

之前用 taro-3.2.x 版本的时候是正常的。

pcdotfan commented 3 years ago

方便的话可否开个复现的仓库?

transtone commented 3 years ago

复现仓库: https://github.com/transtone/nutui-windicss

很囧的是,不是taro 的问题,是 NutUI 的版本问题。NutUI-3.0.3 正常,NutUI-3.1.3异常

ps: 如果照此仓库的 config/index.js 中的 plugins 的写法,也就是多一个默认的 @tarojs/plugin-html , 则运行 taro tailwind --init 会报错。