-
-
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
Add .navbar-nav-scroll for vertical scrolling of navbar content #32037
Conversation
nitpick ... not just vertical scrolling, but horizontal scrolling as well, no? i.e. despite targetting only the |
Just a suggestion here: couldn't we use the scrolling shadow trick by Lea Verou here? Would help to get a visual clue of overflown things. And maybe some |
i'd suggest a new ticket for this. and agree, would be good to provide a visual hint that there's more that can be reached with scrolling (for platforms where the scrollbar is not shown, like mobile). maybe not a shadow, but perhaps a subtle arrow or similar if that's still possible to do with pure CSS |
…e class from first demo, link to the demo from up top
Rebased and updated this PR to prevent the horizontal scrolling issue on expanded navbars. Also documented the potential issue with using Can y'all take another look? |
@mdo it seems there are still overflow in certain display widths But it seems to affect the other snippets too. That being said, I'm having trouble visualizing the scroll part here; I don't see the ability to horizontally scroll at all. |
Like @XhmikosR said, even duplicating some nav items it still overflows horizontally. Am I missing something? |
This is for vertical scroll, not horizontal. On the expanded navbars (that is to say, the horizontal ones) the intent is that you don't see anything different than other navbars. Resetting to overflow visible might not be the right move though (maybe unset or initial?), but I was aiming for something that can be backported to v4. |
Scrollbar only overlapped the button focus, but I've tweaked the demo to prevent that. Also updated the docs verbiage a bit, so should be good to go now. |
Is this available in Bootstrap 4.5 ? |
Fixes #23374.
TODO:
Preview: https://deploy-preview-32037--twbs-bootstrap.netlify.app/docs/5.0/components/navbar/#scrolling