-
-
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
fix(css): force .navbar .dropdown-menu positioning #22644
Conversation
@@ -160,7 +158,8 @@ | |||
flex-direction: row; | |||
|
|||
.dropdown-menu { | |||
position: absolute; | |||
position: absolute !important; |
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.
Not sure about that because Popper always use absolute
position
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.
Yep, I know.
But now, because of mobile first abordation, we need to overwrite L80.
Why mobile first abordation:
- for navbars that never collapse,
.navbar.navbar-expand
. My first navbar in the before example - for navbars that always collapse, just
.navbar
class. My third navbar example in that before pen
About that :
If you user wants to disable that feature they can add Sorry but I'm not sure about what you are trying to fix here |
I'm not sure what are you trying to fix, the first codepen looks better than the second one...? |
Before: http://codepen.io/zalog/pen/eWLvRP
|
I see the dropdowns broken only in the version when you add |
Yes, it's because of this commit. |
With your PR this issue will stay fixed : #22628 ? |
bfbb443
to
1170ba5
Compare
Yep, #22628 stays fixed. |
I approve but it's a real problem to override Popper.js css with |
Yep I know... But this is the only way to override Popper.js and have |
Demo
Problems:
Please follow my example in before, the problems are in the same order.
.navbar.navbar-expand
,.dropdown-menu
hasposition: static
and push parent.navbar
container down.dropdown-menu
it's on the edge of browser, popper will move it and seems unnatural for.navbar
.navbar
(for navbar that always collapse),.dropdown-menu
act in popper style--
I tried to solve that by forcing
.dropdown-menu
to act like before popper, and in a mobile first abordation.cc @Johann-S, #22628, #22630