-
Notifications
You must be signed in to change notification settings - Fork 171
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
feat: contextual menu css position #4915
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
@extend %vf-has-box-shadow; | ||
|
||
display: none; | ||
margin: 0; | ||
margin: 0 0 $input-margin-bottom 0; | ||
max-width: 21rem; | ||
min-width: 10rem; | ||
padding: 0; | ||
|
@@ -83,6 +83,8 @@ | |
} | ||
|
||
.p-contextual-menu__toggle { | ||
// Remove margin bottom for the dropdown menu to be aligned with the toggle | ||
margin-bottom: 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if we can do that. In our example The fact that button has contextual menu should not affect its margin. I guess this was the main reason to use JS for positioning - so we can calculate top position regardless of margin that element having contextual menu may have. |
||
// All buttons have a margin right, unless they are a last child. | ||
// In cases where contextual menu toggle is a button, we do not want it to | ||
// have a margin, but since it is never the last child in this pattern, | ||
|
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.
How is margin on the dropdown related to placement?
Contextual menu is absolutely positioned, so I'm not sure if bottom margin on it affects anything?