From ca2c77e4bd913833583e617d971b933052484cfc Mon Sep 17 00:00:00 2001 From: John60676 Date: Tue, 29 Sep 2020 22:11:06 +0800 Subject: [PATCH] refactor(input): update input style (#2876) * refactor(input): update input style * refactor(form): update form style about input component * refactor(input): update clearable icon style Modify the clearable icon style to prevent the width of the input box from changing due to the insertion of the icon --- components/form/style/index.less | 12 ---- components/input/ClearableLabeledInput.jsx | 26 +++++--- components/input/Input.jsx | 26 +++++++- components/input/style/index.less | 8 +++ components/input/style/mixin.less | 73 +++++++++++----------- components/style/themes/default.less | 2 +- 6 files changed, 87 insertions(+), 60 deletions(-) diff --git a/components/form/style/index.less b/components/form/style/index.less index 1967010e3..97d41fcfe 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -136,23 +136,11 @@ form { .has-feedback { - .@{ant-prefix}-input { - padding-right: @input-padding-horizontal-base + @input-affix-width; - } - // https://github.com/ant-design/ant-design/issues/19884 .@{ant-prefix}-input-affix-wrapper { .@{ant-prefix}-input-suffix { padding-right: 18px; } - .@{ant-prefix}-input { - padding-right: @input-padding-horizontal-base + @input-affix-width * 2; - } - &.@{ant-prefix}-input-affix-wrapper-input-with-clear-btn { - .@{ant-prefix}-input { - padding-right: @input-padding-horizontal-base + @input-affix-width * 3; - } - } } // Fix overlapping between feedback icon and