mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Merge pull request #18469 from twbs/card-deck-margin
Introduce $card-deck-margin variable /fyi @mdo; happy to tweak the var names if desired
This commit is contained in:
commit
92338da1f3
@ -180,22 +180,23 @@
|
||||
.card-deck {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
margin-right: -.625rem;
|
||||
margin-left: -.625rem;
|
||||
margin-right: -$card-deck-margin;
|
||||
margin-left: -$card-deck-margin;
|
||||
|
||||
.card {
|
||||
flex: 1 0 0;
|
||||
margin-right: .625rem;
|
||||
margin-left: .625rem;
|
||||
margin-right: $card-deck-margin;
|
||||
margin-left: $card-deck-margin;
|
||||
}
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
@include media-breakpoint-up(sm) {
|
||||
$space-between-cards: (2 * $card-deck-margin);
|
||||
.card-deck {
|
||||
display: table;
|
||||
table-layout: fixed;
|
||||
border-spacing: 1.25rem 0;
|
||||
border-spacing: $space-between-cards 0;
|
||||
|
||||
.card {
|
||||
display: table-cell;
|
||||
@ -204,8 +205,8 @@
|
||||
}
|
||||
}
|
||||
.card-deck-wrapper {
|
||||
margin-right: -1.25rem;
|
||||
margin-left: -1.25rem;
|
||||
margin-right: (-$space-between-cards);
|
||||
margin-left: (-$space-between-cards);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -486,6 +486,8 @@ $card-bg: #fff !default;
|
||||
|
||||
$card-link-hover-color: #fff !default;
|
||||
|
||||
$card-deck-margin: .625rem !default;
|
||||
|
||||
|
||||
// Tooltips
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user