Skip to content

Commit

Permalink
No scrollbar in Select when menu has dividers (#6804)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Cheng <[email protected]>
  • Loading branch information
evansjohnson and gluxon authored Jun 20, 2024
1 parent 6273c37 commit 0d36ba1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/select/src/components/select/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,33 @@

@import "../../common/variables";

$select-padding: $pt-grid-size * 0.5;

.#{$ns}-select-popover {
.#{$ns}-popover-content {
// use padding on container rather than margin on input group
// because top margin leaves some empty space with no background color.
padding: $pt-grid-size * 0.5;
padding: $select-padding;
}

.#{$ns}-input-group {
margin-bottom: 0;
}

.#{$ns}-menu {
// offset the padding added by the select componenent so menu can remain full width with padding on either side
// this is important so menu dividers can be full width, and so that menu items can have padding to the left and right
// for menu items
margin-left: -$select-padding;
margin-right: -$select-padding;
max-height: $select-popover-max-height;
max-width: $select-popover-max-width;
overflow: auto;
padding: 0;
padding: 0 $select-padding;

&:not(:first-child) {
// adjust padding to account for that on .#{$ns}-popover-content above
padding-top: $pt-grid-size * 0.5;
padding-top: $select-padding;
}
}

Expand Down

1 comment on commit 0d36ba1

@svc-palantir-github
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No scrollbar in Select when menu has dividers (#6804)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.