-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Nested dropdowns #35891
base: main
Are you sure you want to change the base?
Nested dropdowns #35891
Conversation
.dropdown > .dropdown-item:hover ~ .dropdown-menu { | ||
position: absolute; | ||
top: 0; | ||
left: calc(100% - .25rem); // stylelint-disable-line function-disallowed-list |
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.
hmm.. why not just use right: 0
? but better solution is detect position in js - if menu near right side, then submenu must be displayind at left.
} | ||
} | ||
|
||
.dropdown .dropdown-menu:hover, |
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.
what's about other direction classes (.dropup
and etc.)?
This is heavily WIP and will need some JS work to make it perfect. Mobile behavior will be crucial IMO and ultimately makes or breaks this entire effort. This PR adds some basic submenu positioning (not with Popper) and displaying via CSS.
Here's how we'd need to do it right:
Would love to hear from @twbs/js-review and the rest of the team on doing this.