Skip to content
New issue

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

enhance: 避免因优先级导致css变量无法生效 #6649

Closed
wants to merge 0 commits into from
Closed

enhance: 避免因优先级导致css变量无法生效 #6649

wants to merge 0 commits into from

Conversation

kkfive
Copy link

@kkfive kkfive commented Jun 24, 2024

image

如图,tailwindcss 生成的样式表优先级低于页面样式

image

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.60%. Comparing base (cf550e4) to head (1526f52).
Report is 17 commits behind head on master.

Current head 1526f52 differs from pull request most recent head c106365

Please upload reports for the commit c106365 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6649      +/-   ##
==========================================
+ Coverage   92.34%   92.60%   +0.26%     
==========================================
  Files         318      327       +9     
  Lines        6910     7034     +124     
  Branches     1729     1762      +33     
==========================================
+ Hits         6381     6514     +133     
+ Misses        493      484       -9     
  Partials       36       36              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6649.surge.sh

display: flex;
align-items: center;
height: var(--height);
border-bottom: var(--border-bottom);
height: var(--height, 45px);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他地方也会用到 --height 变量,之前的写法可以用来阻断继承。这么改会break掉。如果要解决 tailwind 优先级问题,应该是通过 @layer 引入 antd-mobile 的 css 让其优先级始终低于 tailwind

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是指全量引入么

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkfive kkfive closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants