diff --git a/site/content/docs/5.3/utilities/flex.md b/site/content/docs/5.3/utilities/flex.md
index d0a92e5b5539..23deb93f6126 100644
--- a/site/content/docs/5.3/utilities/flex.md
+++ b/site/content/docs/5.3/utilities/flex.md
@@ -80,47 +80,38 @@ Responsive variations also exist for `flex-direction`.
Use `justify-content` utilities on flexbox containers to change the alignment of flex items on the main axis (the x-axis to start, y-axis if `flex-direction: column`). Choose from `start` (browser default), `end`, `center`, `between`, `around`, or `evenly`.
-
...
...
...
...
...
...
+{{< /example >}}
Responsive variations also exist for `justify-content`.
@@ -141,41 +132,33 @@ Responsive variations also exist for `justify-content`.
Use `align-items` utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if `flex-direction: column`). Choose from `start`, `end`, `center`, `baseline`, or `stretch` (browser default).
-
...
...
...
...
...
+{{< /example >}}
Responsive variations also exist for `align-items`.
@@ -195,41 +178,37 @@ Responsive variations also exist for `align-items`.
Use `align-self` utilities on flexbox items to individually change their alignment on the cross axis (the y-axis to start, x-axis if `flex-direction: column`). Choose from the same options as `align-items`: `start`, `end`, `center`, `baseline`, or `stretch` (browser default).
-
-
-
Flex item
-
Aligned flex item
-
Flex item
-
-
-
Flex item
-
Aligned flex item
-
Flex item
-
-
-
Flex item
-
Aligned flex item
-
Flex item
-
-
-
Flex item
-
Aligned flex item
-
Flex item
-
-
-
Flex item
-
Aligned flex item
-
Flex item
-
+{{< example class=bd-example-flex >}}
+
+
Flex item
+
Aligned flex item
+
Flex item
+
+
+
+
Flex item
+
Aligned flex item
+
Flex item
+
+
+
+
Flex item
+
Aligned flex item
+
Flex item
+
+
+
+
Flex item
+
Aligned flex item
+
Flex item
-```html
-
Aligned flex item
-
Aligned flex item
-
Aligned flex item
-
Aligned flex item
-
Aligned flex item
-```
+
+
Flex item
+
Aligned flex item
+
Flex item
+
+{{< /example >}}
Responsive variations also exist for `align-self`.
@@ -345,72 +324,53 @@ Vertically move one flex item to the top or bottom of a container by mixing `ali
Change how flex items wrap in a flex container. Choose from no wrapping at all (the browser default) with `.flex-nowrap`, wrapping with `.flex-wrap`, or reverse wrapping with `.flex-wrap-reverse`.
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
-
-```html
-
- ...
-
-```
-
-
-
-
Flex item 1
-
Flex item 2
-
Flex item 3
-
Flex item 4
-
Flex item 5
-
Flex item 6
-
Flex item 7
-
Flex item 8
-
Flex item 9
-
Flex item 10
-
Flex item 11
-
Flex item 12
-
Flex item 13
-
Flex item 14
-
-
-
-```html
-
- ...
-
-```
-
-
-
-
Flex item 1
-
Flex item 2
-
Flex item 3
-
Flex item 4
-
Flex item 5
-
Flex item 6
-
Flex item 7
-
Flex item 8
-
Flex item 9
-
Flex item 10
-
Flex item 11
-
Flex item 12
-
Flex item 13
-
Flex item 14
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
- ...
-
-```
+{{< example class=bd-example-flex >}}
+
+ Flex item 1
+ Flex item 2
+ Flex item 3
+ Flex item 4
+ Flex item 5
+ Flex item 6
+ Flex item 7
+ Flex item 8
+ Flex item 9
+ Flex item 10
+ Flex item 11
+ Flex item 12
+ Flex item 13
+ Flex item 14
+
+{{< /example >}}
+{{< example class=bd-example-flex >}}
+
+ Flex item 1
+ Flex item 2
+ Flex item 3
+ Flex item 4
+ Flex item 5
+ Flex item 6
+ Flex item 7
+ Flex item 8
+ Flex item 9
+ Flex item 10
+ Flex item 11
+ Flex item 12
+ Flex item 13
+ Flex item 14
+
+{{< /example >}}
Responsive variations also exist for `flex-wrap`.
@@ -466,151 +426,125 @@ Use `align-content` utilities on flexbox containers to align flex items _togethe
**Heads up!** This property has no effect on single rows of flex items.
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
-
-```html
-
- ...
-
-```
-
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
...
-```
-
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
...
-```
-
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
...
-```
-
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
...
-```
-
-
-
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
Flex item
-
-
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
-```html
-
...
-```
+{{< example class=bd-example-flex >}}
+
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+ Flex item
+
+{{< /example >}}
Responsive variations also exist for `align-content`.
diff --git a/site/content/docs/5.3/utilities/opacity.md b/site/content/docs/5.3/utilities/opacity.md
index 891b46b8fb39..b5ec52a8e8f2 100644
--- a/site/content/docs/5.3/utilities/opacity.md
+++ b/site/content/docs/5.3/utilities/opacity.md
@@ -10,21 +10,13 @@ The `opacity` property sets the opacity level for an element. The opacity level
Set the `opacity` of an element using `.opacity-{value}` utilities.
-
-
100%
-
75%
-
50%
-
25%
-
0%
-
-
-```html
-
...
-
...
-
...
-
...
-
...
-```
+{{< example class=d-sm-flex >}}
+
100%
+
75%
+
50%
+
25%
+
0%
+{{< /example>}}
## CSS
diff --git a/site/content/docs/5.3/utilities/overflow.md b/site/content/docs/5.3/utilities/overflow.md
index 9c8573c3332c..cfd474b4b8fb 100644
--- a/site/content/docs/5.3/utilities/overflow.md
+++ b/site/content/docs/5.3/utilities/overflow.md
@@ -10,83 +10,62 @@ toc: true
Adjust the `overflow` property on the fly with four default values and classes. These classes are not responsive by default.
-
-
- This is an example of using .overflow-auto
on an element with set width and height dimensions. By design, this content will vertically scroll.
-
-
- This is an example of using .overflow-hidden
on an element with set width and height dimensions.
-
-
- This is an example of using .overflow-visible
on an element with set width and height dimensions.
-
-
- This is an example of using .overflow-scroll
on an element with set width and height dimensions.
-
-
-
-```html
-
...
-
...
-
...
-
...
-```
+{{< example class=d-md-flex >}}
+
+ This is an example of using .overflow-auto
on an element with set width and height dimensions. By design, this content will vertically scroll.
+
+
+ This is an example of using .overflow-hidden
on an element with set width and height dimensions.
+
+
+ This is an example of using .overflow-visible
on an element with set width and height dimensions.
+
+
+ This is an example of using .overflow-scroll
on an element with set width and height dimensions.
+
+{{< /example >}}
### `overflow-x`
Adjust the `overflow-x` property to affect the overflow of content horizontally.
-
-
-
.overflow-x-auto
example on an element
-
with set width and height dimensions.
-
-
-
.overflow-x-hidden
example
-
on an element with set width and height dimensions.
-
-
-
.overflow-x-visible
example
-
on an element with set width and height dimensions.
-
-
-
.overflow-x-scroll
example on an element
-
with set width and height dimensions.
-
-
-
-```html
-
...
-
...
-
...
-
...
-```
+{{< example class=d-md-flex >}}
+
+ .overflow-x-auto
example on an element
+ with set width and height dimensions.
+
+
+ .overflow-x-hidden
example
+ on an element with set width and height dimensions.
+
+
+ .overflow-x-visible
example
+ on an element with set width and height dimensions.
+
+
+ .overflow-x-scroll
example on an element
+ with set width and height dimensions.
+
+{{< /example >}}
### `overflow-y`
Adjust the `overflow-y` property to affect the overflow of content vertically.
-
-
- .overflow-y-auto
example on an element with set width and height dimensions.
-
-
- .overflow-y-hidden
example on an element with set width and height dimensions.
-
-
- .overflow-y-visible
example on an element with set width and height dimensions.
-
-
- .overflow-y-scroll
example on an element with set width and height dimensions.
-
-
-
-```html
-
...
-
...
-
...
-
...
-```
+{{< example class=d-md-flex >}}
+
+ .overflow-y-auto
example on an element with set width and height dimensions.
+
+
+ .overflow-y-hidden
example on an element with set width and height dimensions.
+
+
+ .overflow-y-visible
example on an element with set width and height dimensions.
+
+
+ .overflow-y-scroll
example on an element with set width and height dimensions.
+
+{{< /example >}}
Using Sass variables, you may customize the overflow utilities by changing the `$overflows` variable in `_variables.scss`.
diff --git a/site/content/docs/5.3/utilities/spacing.md b/site/content/docs/5.3/utilities/spacing.md
index 2562b8d43e4a..8d87b1e3b7a2 100644
--- a/site/content/docs/5.3/utilities/spacing.md
+++ b/site/content/docs/5.3/utilities/spacing.md
@@ -74,17 +74,11 @@ Here are some representative examples of these classes:
Additionally, Bootstrap also includes an `.mx-auto` class for horizontally centering fixed-width block level content—that is, content that has `display: block` and a `width` set—by setting the horizontal margins to `auto`.
-
-
-```html
-
+{{< example >}}
+
Centered element
-```
+{{< /example >}}
## Negative margin
diff --git a/site/layouts/partials/scripts.html b/site/layouts/partials/scripts.html
index dc92d30e5ac9..f664076ffe21 100644
--- a/site/layouts/partials/scripts.html
+++ b/site/layouts/partials/scripts.html
@@ -26,7 +26,7 @@
// Open in StackBlitz logic
document.querySelectorAll('.btn-edit').forEach(btn => {
btn.addEventListener('click', event => {
- const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML
+ const htmlSnippet = event.target.closest('.bd-code-snippet').querySelector('.bd-example').innerHTML.replace(/"\/docs\//g, '"https://getbootstrap.com/docs/')
// Get extra classes for this example
const classes = Array.from(event.target.closest('.bd-code-snippet').querySelector('.bd-example').classList).join(' ')
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
index a162db521d49..dfe66e65f752 100644
--- a/site/layouts/shortcodes/example.html
+++ b/site/layouts/shortcodes/example.html
@@ -7,43 +7,46 @@
* lang: language used to display the code - default: "html"
* show_markup: if the markup should be output in the HTML - default: `true`
* show_preview: if the preview should be output in the HTML - default: `true`
+ * skip_tag: the tag that should replace the `skip` - default: `div`
* stackblitz_add_js: if extra JS snippet should be added to StackBlitz - default: `false`
*/ -}}
{{- $id := .Get "id" -}}
{{- $class := .Get "class" -}}
{{- $lang := .Get "lang" | default "html" -}}
-{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}}
{{- $show_markup := .Get "show_markup" | default true -}}
{{- $show_preview := .Get "show_preview" | default true -}}
+{{- $skip_tag := .Get "skip" | default "div" -}}
+{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}}
{{- $input := .Inner -}}
{{- $content := .Inner -}}
{{- if eq $show_preview true -}}
diff --git a/site/layouts/shortcodes/js-docs.html b/site/layouts/shortcodes/js-docs.html
index 8eed4a0eb18e..0b5e3574d262 100644
--- a/site/layouts/shortcodes/js-docs.html
+++ b/site/layouts/shortcodes/js-docs.html
@@ -33,7 +33,7 @@
{{- end -}}