mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
Fix wrapping card decks (#22289)
fixes #22007 and fixes #21976 by changing margin strategy for card deck gutters
This commit is contained in:
parent
fe3acc097a
commit
bebdbe4119
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user