From 88d7d8b8223911726d8a0aeed9a16010dca04287 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 2 Sep 2019 12:52:26 +0300 Subject: [PATCH] Use the example shortcode in more places. (#29346) --- site/content/docs/4.3/content/images.md | 54 +++++++--------------- site/content/docs/4.3/utilities/borders.md | 43 ++++++----------- 2 files changed, 30 insertions(+), 67 deletions(-) diff --git a/site/content/docs/4.3/content/images.md b/site/content/docs/4.3/content/images.md index a45e82ae3b..3ed86786cf 100644 --- a/site/content/docs/4.3/content/images.md +++ b/site/content/docs/4.3/content/images.md @@ -10,59 +10,37 @@ toc: true Images in Bootstrap are made responsive with `.img-fluid`. `max-width: 100%;` and `height: auto;` are applied to the image so that it scales with the parent element. -
- {{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}} -
- -{{< highlight html >}} -Responsive image -{{< /highlight >}} +{{< example >}} +{{< placeholder width="100%" height="250" class="bd-placeholder-img-lg img-fluid" text="Responsive image" >}} +{{< /example >}} ## Image thumbnails In addition to our [border-radius utilities]({{< docsref "/utilities/borders" >}}), you can use `.img-thumbnail` to give an image a rounded 1px border appearance. -
- {{< placeholder width="200" height="200" class="img-thumbnail" title="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera" >}} -
- -{{< highlight html >}} -... -{{< /highlight >}} +{{< example >}} +{{< placeholder width="200" height="200" class="img-thumbnail" title="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera" >}} +{{< /example >}} ## Aligning images Align images with the [helper float classes]({{< docsref "/utilities/float" >}}) or [text alignment classes]({{< docsref "/utilities/text#text-alignment" >}}). `block`-level images can be centered using [the `.mx-auto` margin utility class]({{< docsref "/utilities/spacing#horizontal-centering" >}}). -
- {{< placeholder width="200" height="200" class="rounded float-left" >}} - {{< placeholder width="200" height="200" class="rounded float-right" >}} -
+{{< example >}} +{{< placeholder width="200" height="200" class="rounded float-left" >}} +{{< placeholder width="200" height="200" class="rounded float-right" >}} +{{< /example >}} -{{< highlight html >}} -... -... -{{< /highlight >}} -
- {{< placeholder width="200" height="200" class="rounded mx-auto d-block" >}} -
+{{< example >}} +{{< placeholder width="200" height="200" class="rounded mx-auto d-block" >}} +{{< /example >}} -{{< highlight html >}} -... -{{< /highlight >}} - -
-
- {{< placeholder width="200" height="200" class="rounded" >}} -
-
- -{{< highlight html >}} +{{< example >}}
- ... + {{< placeholder width="200" height="200" class="rounded" >}}
-{{< /highlight >}} +{{< /example >}} ## Picture diff --git a/site/content/docs/4.3/utilities/borders.md b/site/content/docs/4.3/utilities/borders.md index 9f082f76a2..b2457353fd 100644 --- a/site/content/docs/4.3/utilities/borders.md +++ b/site/content/docs/4.3/utilities/borders.md @@ -53,38 +53,23 @@ Change the border color using utilities built on our theme colors. Add classes to an element to easily round its corners. -
- {{< placeholder width="75" height="75" class="rounded" title="Example rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-top" title="Example top rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-right" title="Example right rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-left" title="Example left rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-circle" title="Completely round image" >}} - {{< placeholder width="150" height="75" class="rounded-pill" title="Rounded pill image" >}} - {{< placeholder width="75" height="75" class="rounded-0" title="Example non-rounded image (overrides rounding applied elsewhere)" >}} -
+{{< example >}} +{{< placeholder width="75" height="75" class="rounded" title="Example rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-top" title="Example top rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-right" title="Example right rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-bottom" title="Example bottom rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-left" title="Example left rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-circle" title="Completely round image" >}} +{{< placeholder width="150" height="75" class="rounded-pill" title="Rounded pill image" >}} +{{< placeholder width="75" height="75" class="rounded-0" title="Example non-rounded image (overrides rounding applied elsewhere)" >}} +{{< /example >}} -{{< highlight html >}} -... -... -... -... -... -... -... -... -{{< /highlight >}} ## Sizes Use `.rounded-lg` or `.rounded-sm` for larger or smaller border-radius. -
- {{< placeholder width="75" height="75" class="rounded-sm" title="Example small rounded image" >}} - {{< placeholder width="75" height="75" class="rounded-lg" title="Example large rounded image" >}} -
- -{{< highlight html >}} -... -... -{{< /highlight >}} +{{< example >}} +{{< placeholder width="75" height="75" class="rounded-sm" title="Example small rounded image" >}} +{{< placeholder width="75" height="75" class="rounded-lg" title="Example large rounded image" >}} +{{< /example >}}