-
-
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 navbar #34273
Offcanvas navbar #34273
Conversation
Great! Sass file from example is here @mdo there is no |
@craftwerkberlin Nice, just pushed changes up to reflect that :). Should be getting close here! |
@mdo I would kindly ask if you can have a glance again to the Sass file linked in my previous comment. There is a second part of implementation starting in line 53. With this you can override Why this is important? When you check my example again https://examples.bootscore.me/bootstrap-offcanvas-navbar/, the first I think that is a pretty simple but usefull option to make offcanvas more flexible and hope this will be part of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
That's already permissible, it's the code snippet below the example.
Hmm, not seeing that on my phone. |
I know that's permissible, but I feel like using that instead of what we use now will make it clearer :) Like swapping the snippets. On the other hand, I don't think we do this anywhere else, but I just feel it makes sense to always have it collapsed.
Doesn't happen using a phone or the developer tools emulation, but does happen if you have manually resized the window (at least for me here, with FF and Edge, Windows 10, 250% DPI) |
Co-Authored-By: craftwerk <1193597+craftwerk@users.noreply.github.com>
This is a replacement for #33537. Fixes #34098.
The original PR gives us a great starting point, and this PR builds on that by turning the static styles into source Sass that's generated by our breakpoints and is an official component modifier. The way this is built, the new
.navbar-offcanvas-*
classes depend on.navbar-expand-*
classes, so you'll always need a pairing of the two. I think this is okay so as to avoid further duplication.One thing that I'm unsure about is the
.navbar-offcanvas.navbar-expand
situation, which basically says "don't ever use an offcanvas. I think we could omit thexs
.navbar-offcanvas
class entirely, but that might cause issues for others. Until then, it's kind of just useless as this combination will never show a button to open the offcanvas./cc @twbs/css-review @craftwerkberlin
Preview: https://deploy-preview-34273--twbs-bootstrap.netlify.app/docs/5.0/components/navbar/#offcanvas