Skip to content

Commit cc8c089

Browse files
authored
Set a default border-width (#1995)
Fixes a bug where our legacy utility classes would display a border on all edges regardless of direction.
1 parent b434c5d commit cc8c089

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/lazy-turkeys-eat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/patterns': patch
3+
---
4+
5+
Prevent border utility classes from accidentally setting `border-width` on all edges

src/utilities/border/border.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
* To improve the convenience of using these classes without having to specify
55
* a border style and color every time, we use the `:where` selector to set some
66
* reasonable defaults with no specificity depth.
7+
*
8+
* 1. Set a default `border-width` so legacy utility classes won't immediately
9+
* display visible borders on all sides.
710
*/
811

912
:where([class^='u-border'], [class*=' u-border']) {
1013
border-color: var(--theme-color-border-text-group);
1114
border-style: solid;
15+
border-width: 0; /* 1 */
1216
}
1317

1418
/**

0 commit comments

Comments
 (0)