Skip to content

Commit 766850f

Browse files
Improve minimal Card outline (#1157)
1 parent fc489e8 commit 766850f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/shaggy-squids-pull.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/react-brand': patch
3+
---
4+
5+
Improves the appearance of the focus ring on the `minimal` variant of `Card`.

packages/react/src/Card/Card.module.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,18 @@
9292
border-radius: var(--brand-borderRadius-xlarge);
9393
}
9494

95+
.Card__outer:has(.Card--variant-minimal) {
96+
border-radius: var(--brand-borderRadius-small);
97+
}
98+
9599
.Card__outer:focus-within {
96100
outline: var(--brand-borderWidth-thick) solid var(--brand-color-focus);
97101
}
98102

99103
.Card__outer:has(.Card--variant-minimal):focus-within {
100-
outline-offset: var(--base-size-16);
104+
outline-offset: var(
105+
--base-size-12
106+
); /* This value is adjusted so that, when combined with the container's border radius, the total border radius equals `var(--brand-borderRadius-medium)` */
101107
}
102108

103109
.Card--icon {

0 commit comments

Comments
 (0)