From db692d02d555a66219283d5e2150a681fafee1e6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 18 Jul 2019 02:48:43 +0300 Subject: [PATCH] Move margins, and equal height via utility example --- site/content/docs/4.3/components/card.md | 83 ++++++++++++++++++------ 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/site/content/docs/4.3/components/card.md b/site/content/docs/4.3/components/card.md index 4f789fc6fd..7efbd61639 100644 --- a/site/content/docs/4.3/components/card.md +++ b/site/content/docs/4.3/components/card.md @@ -603,12 +603,12 @@ Just like with card groups, card footers in decks will automatically line up. ### Grid cards -Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how many grid columns (wrapped around your cards) you show per row. +Use the Bootstrap grid system and its [`.row-cols` classes]({{< docsref "/layout/grid#row-columns" >}}) to control how many grid columns (wrapped around your cards) you show per row. For example, here's `.row-cols-md-2` splitting four cards to equal width across multiple rows, from the medium breakpoint up. {{< example >}} -
-
-
+
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -616,8 +616,8 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -625,8 +625,8 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -634,8 +634,8 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -646,10 +646,12 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
{{< /example >}} +Change it to `.row-cols-3` and you'll see the fourth card wrap. + {{< example >}} -
-
-
+
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -657,8 +659,8 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -666,8 +668,8 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title
@@ -675,8 +677,51 @@ Use the Bootstrap grid system and its [`.rol-cols` classes]() to control how man
-
-
+
+
+ {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} +
+
Card title
+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+{{< /example >}} + +When you need equal height, add `.h-100` to the cards. + +{{< example >}} +
+
+
+ {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} +
+
Card title
+

This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.

+
+
+
+
+
+ {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} +
+
Card title
+

This is a short card.

+
+
+
+
+
+ {{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}} +
+
Card title
+

This is a longer card with supporting text below as a natural lead-in to additional content.

+
+
+
+
+
{{< placeholder width="100%" height="140" class="card-img-top" text="Image cap" >}}
Card title