-
-
Notifications
You must be signed in to change notification settings - Fork 58
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 borderBackgroundColor
option
#100
base: main
Are you sure you want to change the base?
Add borderBackgroundColor
option
#100
Conversation
👍 |
I've made it so that the user can specify 'none' for no color. I'm unsure if it's good or if we should use null instead. |
|
||
Defaults to `backgroundColor`. Use `'none'` for no color. | ||
*/ | ||
readonly borderBackgroundColor?: 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.
readonly borderBackgroundColor?: Color; | |
readonly borderBackgroundColor?: Color | undefined; |
This would be better than 'none'
.
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.
That wouldn't work because now there is no way to differentiate between "unspecified" and "explicitly no color". Maybe should we revert this back ?
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.
But it should not be in the general Color
type. Only this property needs it. And what do you think of instead having a 'inherit'
case, which it would default to?
So:
{borderBackgroundColor: undefined}
=> no color{borderBackgroundColor: 'inherit'}
=> inherit color{}
=> inherit color
Hi,
I've added the
borderBackgroundColor
option, following most of @ThornDuke's implementation in #94. I've also added docs, example, test and types.All tests pass except the
xo
that throws this error for pre-existing code:I'm not quite sure what triggers it, it might be a new error due to the recent dependency bump (see #97).
Also I'm wondering if we should make
borderBackgroundColor
default tobackgroundColor
if unspecified ?