From c1102df3f037bf212733fcdbe526ffbb07459ad3 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 12 Mar 2021 14:16:58 +0800 Subject: [PATCH] refactor: update select style (#3781) --- components/form/style/index.less | 6 +++--- components/input/style/mixin.less | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/form/style/index.less b/components/form/style/index.less index f139496ba4..afd1fa952a 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -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); } } diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less index 8f4dc9b23a..f8f48aec64 100644 --- a/components/input/style/mixin.less +++ b/components/input/style/mixin.less @@ -170,8 +170,8 @@ .@{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; @@ -179,7 +179,7 @@ &-open, &-focused { - .@{ant-prefix}-select-selection { + .@{ant-prefix}-select-selector { color: @primary-color; } } @@ -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; } @@ -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; } @@ -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; } @@ -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, @@ -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, @@ -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,