Skip to content

Commit

Permalink
fix(comp:select): selector suffix should stay on top (#1205)
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 authored and danranVm committed Oct 21, 2022
1 parent 49863e9 commit de86a17
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions packages/components/_private/selector/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,22 @@
.ellipsis();
}

&-suffix {
.selector-icon();
&-sm &-suffix,
&-sm &-clear {
.selector-icon(@select-height-sm);
}

&-clear {
.selector-icon();
&-md &-suffix,
&-md &-clear {
.selector-icon(@select-height-md);
}

&-lg &-suffix,
&-lg &-clear {
.selector-icon(@select-height-lg);
}

&-clear {
z-index: 1;
opacity: 0;
background-color: @select-icon-background-color;
Expand Down Expand Up @@ -124,11 +133,14 @@
}
}

.selector-icon() {
.selector-icon(@selector-height) {
position: absolute;
top: 50%;
margin-top: -(@select-icon-font-size / 2);
top: 0;
right: @select-icon-margin-right;
display: flex;
align-items: center;
flex-shrink: 0;
height: @selector-height - 2 * @select-border-width;
line-height: 1;
font-size: @select-icon-font-size;
color: @select-icon-color;
Expand Down

0 comments on commit de86a17

Please sign in to comment.