0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-28 10:24:19 +01:00
Fix card list group borders & radii
This commit is contained in:
Martijn Cuppens 2020-04-06 15:29:45 +02:00 committed by XhmikosR
parent ddc58343d3
commit fe9384c216
2 changed files with 18 additions and 20 deletions

View File

@ -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;
> .list-group:last-child {
.list-group-item:last-child {
@include border-bottom-radius($card-border-radius);
&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
}
&:last-child {
border-bottom-width: 0;
@include border-bottom-radius($card-inner-border-radius);
}
}
}

View File

@ -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);
}
@ -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,
@ -131,18 +132,12 @@
// useful within other components (e.g., cards).
.list-group-flush {
@include border-radius(0);
.list-group-item {
border-right-width: 0;
border-left-width: 0;
@include border-radius(0);
border-width: 0 0 $list-group-border-width;
&:first-child {
border-top-width: 0;
}
}
&:last-child {
.list-group-item:last-child {
&:last-child {
border-bottom-width: 0;
}
}