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

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

Open transtone opened this issue 4 years ago • 2 comments

这些样式虽然可以在 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 版本的时候是正常的。

transtone avatar Sep 04 '21 11:09 transtone

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

pcdotfan avatar Sep 05 '21 04:09 pcdotfan

复现仓库: 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 会报错。

transtone avatar Sep 05 '21 12:09 transtone