Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <markd.otto@gmail.com>2017-03-28 08:53:39 +0300
committerGitHub <noreply@github.com>2017-03-28 08:53:39 +0300
commitbebdbe411971206e83b52b2448664acfdb73a174 (patch)
treee17d332abef1753a3896b6d8017f658f52a06f40 /scss/_card.scss
parentfe3acc097ac9def6569f471ef25d444020c30057 (diff)
Fix wrapping card decks (#22289)
fixes #22007 and fixes #21976 by changing margin strategy for card deck gutters
Diffstat (limited to 'scss/_card.scss')
-rw-r--r--scss/_card.scss10
1 files changed, 4 insertions, 6 deletions
diff --git a/scss/_card.scss b/scss/_card.scss
index 99f7c21958..2c74c0c971 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;
}
}
}