From 43232ea4aba69ff1aa5946ef6340d902ca526157 Mon Sep 17 00:00:00 2001 From: Louis-Maxime Piton Date: Tue, 3 Sep 2024 12:16:08 +0200 Subject: [PATCH] Drop `.grid` where we shouldn't use it --- site/content/docs/5.3/layout/css-grid.md | 12 +++++++-- site/content/docs/5.3/utilities/spacing.md | 30 +++++++++++----------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/site/content/docs/5.3/layout/css-grid.md b/site/content/docs/5.3/layout/css-grid.md index c79c4ce0f4..99b85edc47 100644 --- a/site/content/docs/5.3/layout/css-grid.md +++ b/site/content/docs/5.3/layout/css-grid.md @@ -227,13 +227,21 @@ Adding more rows and changing the placement of columns: ### Gaps -Change the vertical gaps only by modifying the `row-gap`. Note that we use `gap` on `.grid`s, but `row-gap` and `column-gap` can be modified as needed. +Change the vertical gaps only by modifying the `row-gap`. Note that we use `gap` on `.grid`s, but `row-gap` and `column-gap` can be modified as needed using either CSS properties, or CSS variables, or our [gap utilities]({{< docsref "/utilities/spacing#gap" >}}). + +{{< example class="bd-example-cssgrid" >}} +
+
.g-col-6
+
.g-col-6
+
.g-col-6
+
.g-col-6
+
+{{< /example >}} {{< example class="bd-example-cssgrid" >}}
.g-col-6
.g-col-6
-
.g-col-6
.g-col-6
diff --git a/site/content/docs/5.3/utilities/spacing.md b/site/content/docs/5.3/utilities/spacing.md index 2562b8d43e..3aa9a8e338 100644 --- a/site/content/docs/5.3/utilities/spacing.md +++ b/site/content/docs/5.3/utilities/spacing.md @@ -103,11 +103,11 @@ The syntax is nearly the same as the default, positive margin utilities, but wit When using `display: grid` or `display: flex`, you can make use of `gap` utilities on the parent element. This can save on having to add margin utilities to individual children of a grid or flex container. Gap utilities are responsive by default, and are generated via our utilities API, based on the `$spacers` Sass map. {{< example class="bd-example-cssgrid" >}} -
-
Grid item 1
-
Grid item 2
-
Grid item 3
-
Grid item 4
+
+
Grid item 1
+
Grid item 2
+
Grid item 3
+
Grid item 4
{{< /example >}} @@ -118,11 +118,11 @@ Support includes responsive options for all of Bootstrap's grid breakpoints, as `row-gap` sets the vertical space between children items in the specified container. {{< example class="bd-example-cssgrid" >}} -
-
Grid item 1
-
Grid item 2
-
Grid item 3
-
Grid item 4
+
+
Grid item 1
+
Grid item 2
+
Grid item 3
+
Grid item 4
{{< /example >}} @@ -131,11 +131,11 @@ Support includes responsive options for all of Bootstrap's grid breakpoints, as `column-gap` sets the horizontal space between children items in the specified container. {{< example class="bd-example-cssgrid" >}} -
-
Grid item 1
-
Grid item 2
-
Grid item 3
-
Grid item 4
+
+
Grid item 1
+
Grid item 2
+
Grid item 3
+
Grid item 4
{{< /example >}}