]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add top placement info to offcanvas docs
authorkyletsang <6854874+kyletsang@users.noreply.github.com>
Sun, 10 Oct 2021 05:05:50 +0000 (22:05 -0700)
committerMark Otto <otto@github.com>
Tue, 2 Nov 2021 20:56:47 +0000 (13:56 -0700)
site/content/docs/5.1/components/offcanvas.md

index b1dd9c601ff5a104e74e1dc051a8dac9797a298d..fd18fe5c98ad26826df76ba54cfb91142ef8ad0c 100644 (file)
@@ -8,7 +8,7 @@ toc: true
 
 ## How it works
 
-Offcanvas is a sidebar component that can be toggled via JavaScript to appear from the left, right, or bottom edge of the viewport. Buttons or anchors are used as triggers that are attached to specific elements you toggle, and `data` attributes are used to invoke our JavaScript.
+Offcanvas is a sidebar component that can be toggled via JavaScript to appear from the left, right, top, or bottom edge of the viewport. Buttons or anchors are used as triggers that are attached to specific elements you toggle, and `data` attributes are used to invoke our JavaScript.
 
 - Offcanvas shares some of the same JavaScript code as modals. Conceptually, they are quite similar, but they are separate plugins.
 - Similarly, some [source Sass](#sass) variables for offcanvas's styles and dimensions are inherited from the modal's variables.
@@ -188,6 +188,7 @@ The offcanvas plugin utilizes a few classes and attributes to handle the heavy l
 - `.offcanvas.show` shows the content
 - `.offcanvas-start` hides the offcanvas on the left
 - `.offcanvas-end` hides the offcanvas on the right
+- `.offcanvas-top` hides the offcanvas on the top
 - `.offcanvas-bottom` hides the offcanvas on the bottom
 
 Add a dismiss button with the `data-bs-dismiss="offcanvas"` attribute, which triggers the JavaScript functionality. Be sure to use the `<button>` element with it for proper behavior across all devices.