Skip to content

Commit

Permalink
Fix no-code example, fix mobile styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Apr 21, 2023
1 parent 083a67a commit 239ddd9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion site/assets/scss/_component-examples.scss
Expand Up @@ -3,6 +3,8 @@
//

.bd-code-snippet {
margin-right: ($bd-gutter-x * -.5);
margin-left: ($bd-gutter-x * -.5);
border: solid var(--bs-border-color);
border-width: 1px 0;

Expand All @@ -17,7 +19,9 @@

position: relative;
padding: var(--bd-example-padding);
margin: 0 ($bd-gutter-x * -.5);
margin: 0 ($bd-gutter-x * -.5) 1rem;
border: solid var(--bs-border-color);
border-width: 1px 0;
@include clearfix();

@include media-breakpoint-up(md) {
Expand All @@ -26,6 +30,7 @@
margin-right: 0;
margin-left: 0;
border-width: 1px;
@include border-radius(var(--bs-border-radius));
}

+ p {
Expand Down
4 changes: 4 additions & 0 deletions site/content/docs/5.3/docsref.md
Expand Up @@ -34,6 +34,10 @@ toc: true
}
```

<div class="bd-example">
The <abbr title="HyperText Markup Language">HTML</abbr> abbreviation element.
</div>

{{< example >}}
<div class="test">This is a test.</div>
{{< /example >}}
Expand Down
2 changes: 1 addition & 1 deletion site/layouts/shortcodes/example.html
Expand Up @@ -21,7 +21,7 @@

<div class="bd-example-snippet bd-code-snippet">
{{- if eq $show_preview true -}}
<div{{ with $id }} id="{{ . }}"{{ end }} class="bd-example{{ with $class }} {{ . }}{{ end }}">
<div{{ with $id }} id="{{ . }}"{{ end }} class="bd-example m-0 border-0{{ with $class }} {{ . }}{{ end }}">
{{- $input -}}
</div>
{{- end -}}
Expand Down

0 comments on commit 239ddd9

Please sign in to comment.