Skip to content

Commit

Permalink
refactor: update select style (vueComponent#3781)
Browse files Browse the repository at this point in the history
  • Loading branch information
John60676 authored Mar 12, 2021
1 parent 7744dd0 commit c1102df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions components/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@ form {

//select
.@{ant-prefix}-select {
&-selection {
&-selector {
border-color: @warning-color;
&:hover {
border-color: @warning-color;
}
}
&-open .@{ant-prefix}-select-selection,
&-focused .@{ant-prefix}-select-selection {
&-open .@{ant-prefix}-select-selector,
&-focused .@{ant-prefix}-select-selector {
.active(@warning-color);
}
}
Expand Down
20 changes: 10 additions & 10 deletions components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@
.@{ant-prefix}-select {
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);

.@{ant-prefix}-select-selection {
margin: -1px;
&.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
.@{ant-prefix}-select-selector {
background-color: inherit;
border: @border-width-base @border-style-base transparent;
box-shadow: none;
}

&-open,
&-focused {
.@{ant-prefix}-select-selection {
.@{ant-prefix}-select-selector {
color: @primary-color;
}
}
Expand All @@ -204,7 +204,7 @@
border-bottom-right-radius: 0;

// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
Expand Down Expand Up @@ -236,7 +236,7 @@
border-bottom-left-radius: 0;

// Reset Select's style in addon
.@{ant-prefix}-select .@{ant-prefix}-select-selection {
.@{ant-prefix}-select .@{ant-prefix}-select-selector {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
Expand All @@ -254,11 +254,11 @@
}

// Fix https://github.com/ant-design/ant-design/issues/5754
&-lg .@{ant-prefix}-select-selection--single {
&-lg .@{ant-prefix}-select-single .@{ant-prefix}-select-selector {
height: @input-height-lg;
}

&-sm .@{ant-prefix}-select-selection--single {
&-sm .@{ant-prefix}-select-single .@{ant-prefix}-select-selector {
height: @input-height-sm;
}

Expand Down Expand Up @@ -304,7 +304,7 @@
}

// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-select > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input,
Expand All @@ -328,7 +328,7 @@
}

& > *:first-child,
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-select:first-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
Expand All @@ -339,7 +339,7 @@
}

& > *:last-child,
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selection,
& > .@{ant-prefix}-select:last-child > .@{ant-prefix}-select-selector,
& > .@{ant-prefix}-calendar-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,
Expand Down

0 comments on commit c1102df

Please sign in to comment.