Skip to content

Commit ad84aaf

Browse files
fix(card): add border radius to slotted content to match parent card (#5796)
* fix(card): add border radius to slotted content to match parent card Co-authored-by: Marissa Huysentruyt <69602589+marissahuysentruyt@users.noreply.github.com> * fix(card): scope border-radius change to small quiet only * chore(card): update golden hash --------- Co-authored-by: Marissa Huysentruyt <69602589+marissahuysentruyt@users.noreply.github.com>
1 parent 7963ed4 commit ad84aaf

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parameters:
2222
# 3. Commit this change to the PR branch where the changes exist.
2323
current_golden_images_hash:
2424
type: string
25-
default: fb61509de41ae6a2cd09fbcf661e20b9f270450b
25+
default: 1bd7e9973de8f318233aa41b5b8a97a2956cd44d
2626
wireit_cache_name:
2727
type: string
2828
default: wireit

packages/card/src/card.css

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ slot[name="description"] {
6060
height: 100%;
6161
}
6262

63+
:host([variant="quiet"][size="s"]) #preview ::slotted(*) {
64+
border-radius: calc(var(--spectrum-card-corner-radius) - var(--spectrum-focus-indicator-thickness));
65+
}
66+
6367
:host([horizontal]) #preview {
6468
width: auto;
6569
}
@@ -97,23 +101,12 @@ sp-popover {
97101
pointer-events: none;
98102
}
99103

100-
:host([variant='quiet']:focus) #preview:after {
101-
border: var(
102-
--mod-card-focus-indicator-width,
103-
var(--spectrum-card-focus-indicator-width)
104-
)
105-
solid
106-
var(
107-
--mod-card-focus-indicator-color,
108-
var(--spectrum-card-focus-indicator-color)
109-
);
104+
:host([variant="quiet"]:focus) #preview:after {
105+
border: var(--mod-card-focus-indicator-width, var(--spectrum-card-focus-indicator-width)) solid var(--mod-card-focus-indicator-color, var(--spectrum-card-focus-indicator-color));
110106
}
111107

112-
:host([variant='quiet'][selected]:focus) #preview {
113-
border-width: var(
114-
--mod-card-focus-indicator-width,
115-
var(--spectrum-card-focus-indicator-width)
116-
);
108+
:host([variant="quiet"][selected]:focus) #preview {
109+
border-width: var(--mod-card-focus-indicator-width, var(--spectrum-card-focus-indicator-width));
117110
}
118111

119112
/* This ensures that the checkbox is tabbable when the card toggles but is not itself focusable */

0 commit comments

Comments
 (0)