]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fixes #17911: Explicitly remove margin-bottom from cards in .card-deck
authorMark Otto <markdotto@gmail.com>
Thu, 12 May 2016 05:14:05 +0000 (22:14 -0700)
committerMark Otto <markdotto@gmail.com>
Thu, 12 May 2016 05:14:05 +0000 (22:14 -0700)
Here we're doing some margin swapping, so it looks a little funky. All this does is match the margin implementation and rendering across our table and flex versions of card decks.

scss/_card.scss

index fd0280a9e91cef69ea01f06f43e4a09040e831c6..a419d4d08d4b7766da98b0a89cfab782a5659165 100644 (file)
 }
 
 
-//
 // Card set
 //
+// Heads up! We do some funky style resetting here for margins across our two
+// variations (one flex, one table). Individual cards have margin-bottom by
+// default, but they're ignored due to table styles. For a consistent design,
+// we've done the same to the flex variation.
+//
+// Those changes are noted by `// Margin balancing`.
 
 @if $enable-flex {
   @include media-breakpoint-up(sm) {
       display: flex;
       flex-flow: row wrap;
       margin-right: -$card-deck-margin;
+      margin-bottom: $card-spacer-y; // Margin balancing
       margin-left: -$card-deck-margin;
 
       .card {
         flex: 1 0 0;
         margin-right: $card-deck-margin;
+        margin-bottom: 0; // Margin balancing
         margin-left: $card-deck-margin;
       }
     }
     .card-deck {
       display: table;
       width: 100%;
+      margin-bottom: $card-spacer-y; // Margin balancing
       table-layout: fixed;
       border-spacing: $space-between-cards 0;
 
       .card {
         display: table-cell;
+        margin-bottom: 0; // Margin balancing
         vertical-align: top;
       }
     }