]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Variable card height (#29462)
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Thu, 3 Oct 2019 07:21:40 +0000 (09:21 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 14 Oct 2019 09:12:05 +0000 (12:12 +0300)
scss/_card.scss
scss/_variables.scss
site/docs/4.3/components/card.md

index fdbe95f404d6c5d5b47dd4dc6a95fa9f384eea73..c23568f37b597caaea8c3c6383d9e3b96e82d369 100644 (file)
@@ -7,6 +7,7 @@
   display: flex;
   flex-direction: column;
   min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
+  height: $card-height;
   word-wrap: break-word;
   background-color: $card-bg;
   background-clip: border-box;
index 3a1917ada4c61a507b1f6a280dc300c452cca6f8..6850b23b5909b7a3270245346477f8bd1e266611 100644 (file)
@@ -834,6 +834,7 @@ $card-border-color:                 rgba($black, .125) !default;
 $card-inner-border-radius:          calc(#{$card-border-radius} - #{$card-border-width}) !default;
 $card-cap-bg:                       rgba($black, .03) !default;
 $card-cap-color:                    null !default;
+$card-height:                       null !default;
 $card-color:                        null !default;
 $card-bg:                           $white !default;
 
index 14a6302c14aa3d97b9dc82eaff4ba91fb3ececae..cb1301b82b1ffb95878a00da86432872b9911b56 100644 (file)
@@ -711,7 +711,7 @@ Change it to `.row-cols-3` and you'll see the fourth card wrap.
 {% endcapture %}
 {% include example.html content=example %}
 
-When you need equal height, add `.h-100` to the cards.
+When you need equal height, add `.h-100` to the cards. If you want equal heights by default, you can set `$card-height: 100%` in Sass.
 
 {% capture example %}
 <div class="row row-cols-1 row-cols-md-3">