Skip to content

Commit 71dfb0d

Browse files
committed
Update docs to use new .show behavior and clarify some copy for first example
1 parent 5cc96d2 commit 71dfb0d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

site/assets/scss/_component-examples.scss

-3
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@
206206

207207
.offcanvas {
208208
position: static;
209-
display: block;
210209
height: 200px;
211-
visibility: visible;
212-
transform: translateX(0);
213210
}
214211
}
215212

site/content/docs/5.0/components/offcanvas.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Offcanvas is a sidebar component that can be toggled via JavaScript to appear fr
2525

2626
### Offcanvas components
2727

28-
Below is a _static_ offcanvas example (meaning its `position`, `display`, and `visibility` have been overridden). Offcanvas includes support for a header with a close button and an optional body class for some initial `padding`. We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action.
28+
Below is an offcanvas example that is shown by default (via `.show` on `.offcanvas`). Offcanvas includes support for a header with a close button and an optional body class for some initial `padding`. We suggest that you include offcanvas headers with dismiss actions whenever possible, or provide an explicit dismiss action.
2929

30-
{{< example class="bd-example-offcanvas p-0 bg-light" >}}
31-
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel">
30+
{{< example class="bd-example-offcanvas p-0 bg-light overflow-hidden" >}}
31+
<div class="offcanvas offcanvas-start show" tabindex="-1" id="offcanvas" aria-labelledby="offcanvasLabel" data-bs-backdrop="false">
3232
<div class="offcanvas-header">
3333
<h5 class="offcanvas-title" id="offcanvasLabel">Offcanvas</h5>
3434
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>

0 commit comments

Comments
 (0)