-
-
Notifications
You must be signed in to change notification settings - Fork 50.6k
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
Add preset color Tag #4571
Add preset color Tag #4571
Conversation
Coverage remained the same at 76.274% when pulling ba76290c4318192a59faca224a8f4a7be199db49 on feat-preset-color-tag into 47fcd76 on feature-2.7. |
ba76290
to
5825a5e
Compare
对于 |
保证 color 的优先级会覆盖 presetColor,应该就够了。 |
这个不能设计成 |
原来的逻辑就是这样的。 不优雅的地方在于 |
想了下,那几个默认色值也很丑,估计不会有人用到。就统一用回 color 吧。 |
本次预设的色板涵盖了 1.x 里的几个预设值,相应添加的 warning 也去掉了。 |
if (/-inverse/.test(color)) { | ||
return true; | ||
} | ||
return /pink|red|yellow|orange|cyan|green|blue|purple/.test(color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
和上面的那个 -inverse
正则可以合并到一起?
/^(pink|red|yellow|orange|cyan|green|blue|purple)(-inverse)?$/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
close #4528