refactor: update select style (#3781)

pull/3197/head^2
John 2021-03-12 14:16:58 +08:00 committed by GitHub
parent 7744dd0b6b
commit c1102df3f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -435,14 +435,14 @@ form {
//select //select
.@{ant-prefix}-select { .@{ant-prefix}-select {
&-selection { &-selector {
border-color: @warning-color; border-color: @warning-color;
&:hover { &:hover {
border-color: @warning-color; border-color: @warning-color;
} }
} }
&-open .@{ant-prefix}-select-selection, &-open .@{ant-prefix}-select-selector,
&-focused .@{ant-prefix}-select-selection { &-focused .@{ant-prefix}-select-selector {
.active(@warning-color); .active(@warning-color);
} }
} }

View File

@ -170,8 +170,8 @@
.@{ant-prefix}-select { .@{ant-prefix}-select {
margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base); margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);
.@{ant-prefix}-select-selection { &.@{ant-prefix}-select-single:not(.@{ant-prefix}-select-customize-input)
margin: -1px; .@{ant-prefix}-select-selector {
background-color: inherit; background-color: inherit;
border: @border-width-base @border-style-base transparent; border: @border-width-base @border-style-base transparent;
box-shadow: none; box-shadow: none;
@ -179,7 +179,7 @@
&-open, &-open,
&-focused { &-focused {
.@{ant-prefix}-select-selection { .@{ant-prefix}-select-selector {
color: @primary-color; color: @primary-color;
} }
} }
@ -204,7 +204,7 @@
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
// Reset Select's style in addon // 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-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
} }
@ -236,7 +236,7 @@
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
// Reset Select's style in addon // 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-top-left-radius: 0;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
@ -254,11 +254,11 @@
} }
// Fix https://github.com/ant-design/ant-design/issues/5754 // 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; height: @input-height-lg;
} }
&-sm .@{ant-prefix}-select-selection--single { &-sm .@{ant-prefix}-select-single .@{ant-prefix}-select-selector {
height: @input-height-sm; height: @input-height-sm;
} }
@ -304,7 +304,7 @@
} }
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input // 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}-calendar-picker .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input, & > .@{ant-prefix}-select-auto-complete .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input, & > .@{ant-prefix}-cascader-picker .@{ant-prefix}-input,
@ -328,7 +328,7 @@
} }
& > *:first-child, & > *: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}-calendar-picker:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input, & > .@{ant-prefix}-select-auto-complete:first-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input, & > .@{ant-prefix}-cascader-picker:first-child .@{ant-prefix}-input,
@ -339,7 +339,7 @@
} }
& > *:last-child, & > *: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}-calendar-picker:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input, & > .@{ant-prefix}-select-auto-complete:last-child .@{ant-prefix}-input,
& > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input, & > .@{ant-prefix}-cascader-picker:last-child .@{ant-prefix}-input,