Skip to content

Commit fccdda5

Browse files
royklutmanXhmikosR
authored andcommitted
Fix for double border on cards in an accordion (#27133)
1 parent bc2a985 commit fccdda5

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

scss/_card.scss

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -277,25 +277,33 @@
277277
//
278278

279279
.accordion {
280-
.card:not(:first-of-type):not(:last-of-type) {
281-
border-bottom: 0;
282-
border-radius: 0;
283-
}
280+
.card {
281+
overflow: hidden;
282+
283+
&:not(:first-of-type) {
284+
.card-header:first-child {
285+
border-radius: 0;
286+
}
284287

285-
.card:not(:first-of-type) {
286-
.card-header:first-child {
287-
border-radius: 0;
288+
&:not(:last-of-type) {
289+
border-bottom: 0;
290+
border-radius: 0;
291+
}
288292
}
289-
}
290293

291-
.card:first-of-type {
292-
border-bottom: 0;
293-
border-bottom-right-radius: 0;
294-
border-bottom-left-radius: 0;
295-
}
294+
&:first-of-type {
295+
border-bottom: 0;
296+
border-bottom-right-radius: 0;
297+
border-bottom-left-radius: 0;
298+
}
296299

297-
.card:last-of-type {
298-
border-top-left-radius: 0;
299-
border-top-right-radius: 0;
300+
&:last-of-type {
301+
border-top-left-radius: 0;
302+
border-top-right-radius: 0;
303+
}
304+
305+
.card-header {
306+
margin-bottom: -$card-border-width;
307+
}
300308
}
301309
}

0 commit comments

Comments
 (0)