From 6769a9baa91ef7a74678b1bc73a86885408f35c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Mon, 6 Jul 2020 23:01:43 +0800 Subject: [PATCH] fix: RangePicker clear btn position (#25458) --- components/date-picker/style/index.less | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/date-picker/style/index.less b/components/date-picker/style/index.less index db55fe8df7..92f5ee9c95 100644 --- a/components/date-picker/style/index.less +++ b/components/date-picker/style/index.less @@ -61,6 +61,7 @@ &-input { position: relative; display: inline-flex; + align-items: center; width: 100%; > input { @@ -109,7 +110,12 @@ align-self: center; margin-left: @padding-xs / 2; color: @disabled-color; + line-height: 1; pointer-events: none; + + > * { + vertical-align: top; + } } &-clear { @@ -117,12 +123,17 @@ top: 50%; right: 0; color: @disabled-color; + line-height: 1; background: @component-background; transform: translateY(-50%); cursor: pointer; opacity: 0; transition: opacity @animation-duration-slow, color @animation-duration-slow; + > * { + vertical-align: top; + } + &:hover { color: @text-color-secondary; } @@ -187,6 +198,12 @@ padding: 0 @padding-xs; line-height: 1; } + + &.@{picker-prefix-cls}-small { + .@{picker-prefix-cls}-clear { + right: @input-padding-horizontal-sm; + } + } } // ======================= Dropdown =======================