fix(button): 增加 CSS 变量配置颜色的例子,完善 color 属性的使用场景描述 #1857
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 这个变动的性质是?
🔗 相关 Issue
按钮 color 属性的使用存在不明确的地方,在不同的按钮模式下设置color有可能表现异常,所以要更加准确的描述 color 的使用场景。
💡 需求背景和解决方案
1.更准确的描述 color 属性的使用场景或实现逻辑。
2.自定义颜色 demo 和文档更新为基于 css 变量的实现。
3.建议复杂配色使用 css 变量,而不是通过 color 使用,因为 color 属性无法处理文本和背景颜色相同的情况,如果处理此情况,还要增加 background 属性。所以建议逐渐废弃此属性。