',
'
',
@@ -34,7 +34,7 @@ export default () => {
// Ignore examples made by shortcode
if (!element.closest('.bd-example-snippet')) {
element.insertAdjacentHTML('beforebegin', btnHtml)
- element.previousElementSibling.append(element)
+ element.previousElementSibling.prepend(element)
}
})
diff --git a/site/assets/scss/_component-examples.scss b/site/assets/scss/_component-examples.scss
index fde8b7f4164a..2ec19ec34769 100644
--- a/site/assets/scss/_component-examples.scss
+++ b/site/assets/scss/_component-examples.scss
@@ -3,6 +3,8 @@
//
.bd-code-snippet {
+ display: flex;
+ flex-direction: column;
margin: 0 ($bd-gutter-x * -.5) 1rem;
border: solid var(--bs-border-color);
border-width: 1px 0;
@@ -392,7 +394,11 @@
}
.bd-file-ref {
+ position: relative;
+
.highlight-toolbar {
+ min-height: $spacer * 2.625;
+
@include media-breakpoint-up(md) {
@include border-top-radius(calc(var(--bs-border-radius) - 1px));
}
diff --git a/site/layouts/shortcodes/example.html b/site/layouts/shortcodes/example.html
index 5b398e6814fc..8168dc11b6a2 100644
--- a/site/layouts/shortcodes/example.html
+++ b/site/layouts/shortcodes/example.html
@@ -21,14 +21,20 @@
{{- if eq $show_preview true }}
-
+
{{ $content }}
{{- end }}
{{- if eq $show_markup true -}}
+
+ {{- $content = replaceRE `