diff options
| author | Mark Otto <[email protected]> | 2017-03-27 22:53:39 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-03-27 22:53:39 -0700 |
| commit | bebdbe411971206e83b52b2448664acfdb73a174 (patch) | |
| tree | e17d332abef1753a3896b6d8017f658f52a06f40 | |
| parent | fe3acc097ac9def6569f471ef25d444020c30057 (diff) | |
| download | bootstrap-bebdbe411971206e83b52b2448664acfdb73a174.tar.xz bootstrap-bebdbe411971206e83b52b2448664acfdb73a174.zip | |
Fix wrapping card decks (#22289)
fixes #22007 and fixes #21976 by changing margin strategy for card deck gutters
| -rw-r--r-- | scss/_card.scss | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scss/_card.scss b/scss/_card.scss index 99f7c2195..2c74c0c97 100644 --- a/scss/_card.scss +++ b/scss/_card.scss @@ -190,17 +190,15 @@ .card-deck { display: flex; flex-flow: row wrap; + margin-right: -$card-deck-margin; + margin-left: -$card-deck-margin; .card { display: flex; flex: 1 0 0; flex-direction: column; - - // Selectively apply horizontal margins to cards to avoid doing the - // negative margin dance like our grid. This differs from the grid - // due to the use of margins as gutters instead of padding. - &:not(:first-child) { margin-left: $card-deck-margin; } - &:not(:last-child) { margin-right: $card-deck-margin; } + margin-right: $card-deck-margin; + margin-left: $card-deck-margin; } } } |
