-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offcanvas inside containers other than viewport #33574
Comments
I believe this is already possible, but a quick demo could be helpful for sure. Unsure what kind of potential issues the backdrop could introduce though. Might be something @GeoSot is already thinking about elsewhere. |
@mdo when #33545 is landed, will be possible to have this feature, given a mark-up to constrain .offcanvas-parent {
position: relative;
overflow: hidden;
.offcanvas {
position: absolute;
}
.modal-backdrop {
position: absolute;
height: 100%;
width: 100%;
}
}
|
@GeoSot given the above comment, you mean that Offcanvas now can be positioned relatively inside a parent? My use-case would be to show an offcanvas pane at the right, inside of a content div that has menus around it on the top, left and bottom. The default Offcanvas behavior on the viewport now is to show the offcanvas positioned over the top and bottom menus. So based on the TS codepen I tried to use your css snippet, but did not manage to position the Offcanvas inside of the "Content" div: https://codepen.io/rvanlaak/pen/dympKXQ Update: Solved ✅ Managed to change the Codepen to show the offcanvas inside of the content div |
In some user interfaces, it's possible to make a drawer appear using any element with appropriate classes as the container, rather than the viewport. I'd like to use this to allow properties panes to easily be associated with different parts of the page, rather than needing to go to the window edge all the time.
A codepen for the sort of thing I'm after:
https://codepen.io/iainhallam/pen/vYywVev
If this is already possible, could it be added to the documentation, and if not, could this be a feature request, please?
The text was updated successfully, but these errors were encountered: