Skip to content

Commit

Permalink
Simplify list-group borders in cards
Browse files Browse the repository at this point in the history
Consolidates some CSS and beefs up the selector to account for inherited border styles. Fixes #30793, a regression from v4.4.1 that shipped in #30497.
  • Loading branch information
mdo committed May 13, 2020
1 parent 1eaae4f commit cfc230d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scss/_card.scss
Expand Up @@ -33,6 +33,12 @@
@include border-bottom-radius($card-inner-border-radius);
}
}

// Due to specificity of the above selector (`.card > .list-group`), we must
// use a child selector here to prevent a double border.
> .card-header + .list-group {
border-top: 0;
}
}

.card-body {
Expand Down Expand Up @@ -80,12 +86,6 @@
&:first-child {
@include border-radius($card-inner-border-radius $card-inner-border-radius 0 0);
}

+ .list-group {
.list-group-item:first-child {
border-top: 0;
}
}
}

.card-footer {
Expand Down

0 comments on commit cfc230d

Please sign in to comment.