Skip to content

Commit bb078d6

Browse files
Fix dark offcanvas doc
1 parent f6eb3d4 commit bb078d6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,19 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi
146146

147147
## Dark offcanvas
148148

149-
{{< added-in "5.2.0" >}}
149+
{{< deprecated-in "5.3.2" >}}
150150

151-
Change the appearance of offcanvases with utilities to better match them to different contexts like dark navbars. Here we add `.text-bg-dark` to the `.offcanvas` for proper styling with a dark offcanvas. If you have dropdowns within, consider also adding `.dropdown-menu-dark` to `.dropdown-menu`.
151+
Change the appearance of offcanvases with utilities to better match them to different contexts like dark navbars. Here we add `.text-bg-dark` to the `.offcanvas` and `.btn-close-white` to `.btn-close` for proper styling with a dark offcanvas. If you have dropdowns within, consider also adding `.dropdown-menu-dark` to `.dropdown-menu`.
152152

153-
{{< example class="bd-example-offcanvas p-0 bg-body-tertiary overflow-hidden" stackblitz_add_js="true" >}}
153+
{{< callout warning >}}
154+
Heads up! Dark variants for components were deprecated in v5.3.0 with the introduction of color modes. Instead of manually adding classes mentioned above, set `data-bs-theme="dark"` on the root element, a parent wrapper, or the component itself.
155+
{{< /callout >}}
156+
157+
{{< example class="bd-example-offcanvas p-0 bg-body-secondary overflow-hidden" >}}
154158
<div class="offcanvas offcanvas-start show text-bg-dark" tabindex="-1" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
155159
<div class="offcanvas-header">
156160
<h5 class="offcanvas-title" id="offcanvasDarkLabel">Offcanvas</h5>
157-
<button type="button" class="btn-close" data-bs-dismiss="offcanvasDark" aria-label="Close" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Close"></button>
161+
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvasDark" aria-label="Close"></button>
158162
</div>
159163
<div class="offcanvas-body">
160164
<p>Place offcanvas content here.</p>

0 commit comments

Comments
 (0)