Skip to content

Commit

Permalink
Mention deprecated classes for color mode on offcanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jan 12, 2023
1 parent 2d57b88 commit f23e203
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion site/content/docs/5.3/components/offcanvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,14 @@ When backdrop is set to static, the offcanvas will not close when clicking outsi

## Dark offcanvas

{{< added-in "5.2.0" >}}
{{< deprecated-in "5.3.0" >}} {{< added-in "5.2.0" >}}

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`.

{{< callout warning >}}
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.
{{< /callout >}}

{{< example class="bd-example-offcanvas p-0 bg-body-secondary overflow-hidden" >}}
<div class="offcanvas offcanvas-start show text-bg-dark" tabindex="-1" id="offcanvasDark" aria-labelledby="offcanvasDarkLabel">
<div class="offcanvas-header">
Expand Down

0 comments on commit f23e203

Please sign in to comment.