Skip to content

Commit

Permalink
[core] fix(HTMLSelect): align right icon with button (#6275)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Jul 12, 2023
1 parent c478730 commit eb6a7b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
8 changes: 5 additions & 3 deletions packages/core/src/components/html-select/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-webkit-appearance: none;
border-radius: $pt-border-radius;
height: $pt-button-height;
padding: 0 ($input-padding-horizontal * 2.5) 0 $input-padding-horizontal;
padding: 0 ($input-padding-horizontal * 3) 0 $input-padding-horizontal;
// fill parent container
width: 100%;
/* stylelint-enable property-no-vendor-prefix */
Expand All @@ -39,11 +39,13 @@
cursor: not-allowed;
}

%pt-select-arrow {
%pt-select-icon {
color: $pt-icon-color;
pointer-events: none;
position: absolute;
right: $input-padding-horizontal * 0.7;
// N.B. it's more important for the icon to vertically align with button right icons rather than
// input right padding, see https://github.com/palantir/blueprint/issues/6184
right: $pt-grid-size;
top: ($pt-button-height - $pt-icon-size-standard) * 0.5;

&.#{$ns}-disabled {
Expand Down
11 changes: 3 additions & 8 deletions packages/core/src/components/html-select/_html-select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,10 @@ Styleguide select
&:disabled {
@extend %pt-select-disabled;
}

&::-ms-expand {
// IE11 styling to hide the arrow
display: none;
}
}

.#{$ns}-icon {
@extend %pt-select-arrow;
@extend %pt-select-icon;
@include pt-icon-colors();
}

Expand Down Expand Up @@ -98,14 +93,14 @@ Styleguide select

.#{$ns}-html-select {
.#{$ns}-icon {
@extend %pt-select-arrow;
@extend %pt-select-icon;
}
}

// N.B. this icon implementation is deprecated and will be removed in Blueprint 6.0
.#{$ns}-select {
&::after {
@extend %pt-select-arrow;
@extend %pt-select-icon;
@include pt-icon();
content: map-get($blueprint-icon-codepoints, "double-caret-vertical");
}
Expand Down

1 comment on commit eb6a7b7

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[core] fix(HTMLSelect): align right icon with button (#6275)

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.