Skip to content

Commit

Permalink
Backport #30497
Browse files Browse the repository at this point in the history
Fix card list group borders & radii
  • Loading branch information
MartijnCuppens authored and XhmikosR committed Apr 13, 2020
1 parent ddc5834 commit fe9384c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
17 changes: 10 additions & 7 deletions scss/_card.scss
Expand Up @@ -19,15 +19,18 @@
margin-left: 0;
}

> .list-group:first-child {
.list-group-item:first-child {
@include border-top-radius($card-border-radius);
> .list-group {
border-top: inherit;
border-bottom: inherit;

&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
}
}

> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
&:last-child {
border-bottom-width: 0;
@include border-bottom-radius($card-inner-border-radius);
}
}
}
Expand Down
19 changes: 7 additions & 12 deletions scss/_list-group.scss
Expand Up @@ -9,6 +9,7 @@
// No need to set list-style: none; since .list-group-item is block level
padding-left: 0; // reset padding because ul and ol
margin-bottom: 0;
@include border-radius($list-group-border-radius);
}


Expand Down Expand Up @@ -51,11 +52,11 @@
border: $list-group-border-width solid $list-group-border-color;

&:first-child {
@include border-top-radius($list-group-border-radius);
@include border-top-radius(inherit);
}

&:last-child {
@include border-bottom-radius($list-group-border-radius);
@include border-bottom-radius(inherit);
}

&.disabled,
Expand Down Expand Up @@ -131,18 +132,12 @@
// useful within other components (e.g., cards).

.list-group-flush {
.list-group-item {
border-right-width: 0;
border-left-width: 0;
@include border-radius(0);
@include border-radius(0);

&:first-child {
border-top-width: 0;
}
}
.list-group-item {
border-width: 0 0 $list-group-border-width;

&:last-child {
.list-group-item:last-child {
&:last-child {
border-bottom-width: 0;
}
}
Expand Down

0 comments on commit fe9384c

Please sign in to comment.