Variable card height (#29462)
This commit is contained in:
parent
f6a1e2fc89
commit
03c9788f7a
@ -7,6 +7,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
||||||
|
height: $card-height;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
background-color: $card-bg;
|
background-color: $card-bg;
|
||||||
background-clip: border-box;
|
background-clip: border-box;
|
||||||
|
@ -840,6 +840,7 @@ $card-border-color: rgba($black, .125) !default;
|
|||||||
$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
|
$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
|
||||||
$card-cap-bg: rgba($black, .03) !default;
|
$card-cap-bg: rgba($black, .03) !default;
|
||||||
$card-cap-color: null !default;
|
$card-cap-color: null !default;
|
||||||
|
$card-height: null !default;
|
||||||
$card-color: null !default;
|
$card-color: null !default;
|
||||||
$card-bg: $white !default;
|
$card-bg: $white !default;
|
||||||
|
|
||||||
|
@ -689,7 +689,7 @@ Change it to `.row-cols-3` and you'll see the fourth card wrap.
|
|||||||
</div>
|
</div>
|
||||||
{{< /example >}}
|
{{< /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.
|
||||||
|
|
||||||
{{< example >}}
|
{{< example >}}
|
||||||
<div class="row row-cols-1 row-cols-md-3">
|
<div class="row row-cols-1 row-cols-md-3">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user