add support for 'none' BorderSizeValue to hide border#5012
Conversation
| return `var(--spectrum-alias-border-size-${value})`; | ||
| return value && value !== 'none' | ||
| ? `var(--spectrum-alias-border-size-${value})` | ||
| : undefined; |
There was a problem hiding this comment.
this won't work, border size defaults to medium
https://jsfiddle.net/qv5kp0zr/1/
https://developer.mozilla.org/en-US/docs/Web/CSS/border-width#formal_definition
We'll need to set the returned value to 0 instead
There was a problem hiding this comment.
Good catch. While testing it was working for me on storybook but it is better to return 0. I've updated the PR. Thanks
056c4d6 to
6bc72f1
Compare
|
Do we need |
6bc72f1 to
814669c
Compare
I added none so that the users can choose to omit or explicitly specify |
814669c to
91f7058
Compare
|
@pr7prashant apologies about the PR highjacking, we were looking to get this in for an upcoming testing session. Still discussing amongst the team about what exact api we want here. EDIT: we've gone back to accepting "none" as an option, I've added some tests to cover the changes. Thanks for the contribution! |
@LFDanLu No worries and thanks for the tests :) |
Closes #4833
✅ Pull Request Checklist:
📝 Test Instructions:
noneas border size should display no border.noneand omitting the break point should display no border.🧢 Your Project: