We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
小程序基础库: 2.11.0 使用框架: React
``` css div{ padding: 0px; } /* 针对div 对class*/ .biz{ padding: 2px; } ```
``` CSS .h5-div{ padding: 0px; } /* 针对div 对class*/ .biz{ padding: 2px; } ```
此时 div 的优先级就和class选择器同级了
转译后的优先级和转译前相同
之前的标签样式会与类样式同优先级
👽 Taro v3.3.12 Taro CLI 3.3.12 environment info: System: OS: macOS 12.0.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.10.0 - /var/folders/9x/z9ks542s7y99fmscy1myc3vh0000gp/T/yarn--1636958988741-0.6400798677934707/node Yarn: 1.22.15 - /var/folders/9x/z9ks542s7y99fmscy1myc3vh0000gp/T/yarn--1636958988741-0.6400798677934707/yarn npm: 7.24.0 - /var/folders/9x/z9ks542s7y99fmscy1myc3vh0000gp/T/fnm_multishells/28938_1636688252634/bin/npm npmPackages: @tarojs/cli: ^3.2.0 => 3.3.12 @tarojs/components: ^3.2.0 => 3.3.12 @tarojs/mini-runner: ^3.2.0 => 3.3.12 @tarojs/react: ^3.2.0 => 3.3.12 @tarojs/runtime: ^3.2.0 => 3.3.12 @tarojs/taro: ^3.2.0 => 3.3.12 @tarojs/webpack-runner: ^3.2.0 => 3.3.12 babel-preset-taro: ^3.2.0 => 3.3.12 eslint-config-taro: ^3.2.0 => 3.3.12 react: ^16.14.0 => 16.14.0 taro-ui: ^3.0.0-alpha => 3.0.0-alpha.10
The text was updated successfully, but these errors were encountered:
想到的方案 提高原class选择器优先级,加入一个class类名 让原class类优先级提高一层
Sorry, something went wrong.
update(html): html元素转译时加入tph class,调整css优先级
53f30b8
NervJS#10660
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.11.0
使用框架: React
复现步骤
之前组件库有一些重制样式
转换后
此时 div 的优先级就和class选择器同级了
期望结果
转译后的优先级和转译前相同
实际结果
之前的标签样式会与类样式同优先级
环境信息
The text was updated successfully, but these errors were encountered: