From 3fa2b4866793076657c483405a15f2983f6ae421 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 2 Mar 2021 08:21:19 +0800 Subject: [PATCH] fix: Select tags caret position (#29561) close #29559 --- components/select/style/multiple.less | 7 +++---- components/select/style/rtl.less | 21 +-------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/components/select/style/multiple.less b/components/select/style/multiple.less index f0733617d5..737c30b7d9 100644 --- a/components/select/style/multiple.less +++ b/components/select/style/multiple.less @@ -204,10 +204,9 @@ .@{select-prefix-cls}-selection-placeholder { left: @input-padding-horizontal-sm; } - // https://github.com/ant-design/ant-design/issues/22906 - .@{select-prefix-cls}-selection-search:first-child - .@{select-prefix-cls}-selection-search-input { - margin-left: 3px; + // https://github.com/ant-design/ant-design/issues/29559 + .@{select-prefix-cls}-selection-search { + margin-inline-start: 3px; } } &.@{select-prefix-cls}-lg { diff --git a/components/select/style/rtl.less b/components/select/style/rtl.less index 56038a8630..3497c899b7 100644 --- a/components/select/style/rtl.less +++ b/components/select/style/rtl.less @@ -86,13 +86,6 @@ left: auto; } } - - &:first-child > .@{select-prefix-cls}-selection-search-input { - .@{select-prefix-cls}-rtl& { - margin-right: 5px !important; - margin-left: 0 !important; - } - } } // ======================= Placeholder ======================= @@ -149,18 +142,6 @@ } } - // ========================== Input ========================== - // We only change the style of non-customize input which is only support by `combobox` mode. - - // Not customize - &:not(.@{select-prefix-cls}-customize-input) { - .@{select-prefix-cls}-selector { - .@{select-prefix-cls}-rtl& { - padding: 0 @input-padding-horizontal-base; - } - } - } - // ============================================================ // == Size == // ============================================================ @@ -171,7 +152,7 @@ // With arrow should provides `padding-right` to show the arrow &.@{select-prefix-cls}-show-arrow .@{select-prefix-cls}-selection-search { .@{select-prefix-cls}-rtl& { - right: 0; + right: @input-padding-horizontal-sm - 1px; } }