Skip to content

Commit 14120c8

Browse files
authored
fix(border.style): zero value (#279)
1 parent 8d12c6e commit 14120c8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/eight-pans-sneeze.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
The `border` style now explicitly sets zero-width border for all border that are not mentioned by modifiers. So that it always overrides default values.

src/tasty/styles/border.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ export function borderStyle({ border }) {
3838
return { border: styleValue };
3939
}
4040

41+
const zeroValue = [0, type, borderColor].join(' ');
42+
4143
return DIRECTIONS.reduce((styles, dir) => {
4244
if (mods.includes(dir)) {
4345
styles[`border-${dir}`] = styleValue;
4446
} else {
45-
styles[`border-${dir}`] = '0 solid borderColor';
47+
styles[`border-${dir}`] = zeroValue;
4648
}
4749

4850
return styles;

0 commit comments

Comments
 (0)