offcanvas in navigation (navbar expand) default z-index to 1000 will cover other elements
Created by: yurj
https://github.com/twbs/bootstrap/blob/main/scss/_navbar.scss#L204
In an navbar-expand element, offcanvas z-index is 1000. When the opener is clicked, it is set to $zindex-offcanvas (usually 1045): https://github.com/twbs/bootstrap/blob/main/scss/_offcanvas.scss#L4
If there's another element in the page with z-index greater than 0 that overlaps the navbar with offcanvas, part of the navbar will be over the element (the offcanvas one), while the remanent part of the navbar will stay below. Below an jsbin example, above the lg breakpoint, the first navigation bar is overlapped totally, the second one is overlapped partially (not in the offcanvas part, due to the z-index: 1000).
Proposal: set z-index: auto at https://github.com/twbs/bootstrap/blob/main/scss/_navbar.scss#L204, I can't see any need to set it to 1000 because it should act as the other elements when not active as offcanvas. When active, let javascript set it to $zindex-offcanvas (1045) (or other css way if possible)
Use case: mostly sidebars (for example an admin one when logged) which can easly overlap with a navbar/visible offcanvas element.
Demo: https://output.jsbin.com/veviwuqefa/ Version: Bootstrap 5.1.1 Browsers: Mozilla Firefox 78.14.0esr (64-bit) and Chrome 94.0.4606.61 (official Build) (64 bit) OS: Debian Linux