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

fix(button): 增加 CSS 变量配置颜色的例子,完善 color 属性的使用场景描述 #1857

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

oasis-cloud
Copy link
Collaborator

@oasis-cloud oasis-cloud commented Jan 15, 2024

🤔 这个变动的性质是?

  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进

🔗 相关 Issue

按钮 color 属性的使用存在不明确的地方,在不同的按钮模式下设置color有可能表现异常,所以要更加准确的描述 color 的使用场景。

💡 需求背景和解决方案

1.更准确的描述 color 属性的使用场景或实现逻辑。
2.自定义颜色 demo 和文档更新为基于 css 变量的实现。
3.建议复杂配色使用 css 变量,而不是通过 color 使用,因为 color 属性无法处理文本和背景颜色相同的情况,如果处理此情况,还要增加 background 属性。所以建议逐渐废弃此属性。

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2bccea4) 75.86% compared to head (2f94263) 75.86%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1857   +/-   ##
=======================================
  Coverage   75.86%   75.86%           
=======================================
  Files         215      215           
  Lines        8661     8661           
  Branches     2479     2479           
=======================================
  Hits         6571     6571           
  Misses       1893     1893           
  Partials      197      197           

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

@oasis-cloud oasis-cloud changed the title fix: 增加 CSS 变量配置颜色的例子,完善 color 属性的使用场景描述 fix(button): 增加 CSS 变量配置颜色的例子,完善 color 属性的使用场景描述 Jan 15, 2024
@oasis-cloud oasis-cloud marked this pull request as ready for review January 17, 2024 01:44
@xiaoyatong xiaoyatong merged commit 8073c91 into jdf2e:next Jan 19, 2024
5 checks passed
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.

[FR]: 【Button】优化自定义 color 在不同 fill 时的异常表现以及点击背景色
2 participants