From 33c0da0042bbfd6eca152e280e24a02f63f3e4be Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 15 Apr 2022 16:54:30 +0800 Subject: [PATCH] style: cleanup upload unused styles (#35052) --- components/upload/style/index.less | 41 ++++++------------------------ components/upload/style/rtl.less | 14 ---------- 2 files changed, 8 insertions(+), 47 deletions(-) diff --git a/components/upload/style/index.less b/components/upload/style/index.less index 49ba7f211b..5aa13c2cb0 100644 --- a/components/upload/style/index.less +++ b/components/upload/style/index.less @@ -168,9 +168,11 @@ &-btn { opacity: 0; } + &-btn.@{ant-prefix}-btn-sm { - height: 20px; + height: @line-height-base * @font-size-base; line-height: 1; + vertical-align: top; } &.picture { @@ -185,6 +187,11 @@ .@{iconfont-css-prefix} { color: @upload-actions-color; + transition: all 0.3s; + } + + &:hover .@{iconfont-css-prefix} { + color: @text-color; } } @@ -210,30 +217,10 @@ } } - .@{iconfont-css-prefix}-close { - position: absolute; - top: 6px; - right: 4px; - color: @text-color-secondary; - font-size: 10px; - line-height: 0; - cursor: pointer; - opacity: 0; - transition: all 0.3s; - - &:hover { - color: @text-color; - } - } - &:hover &-info { background-color: @item-hover-bg; } - &:hover .@{iconfont-css-prefix}-close { - opacity: 1; - } - &:hover &-card-actions-btn { opacity: 1; } @@ -369,14 +356,6 @@ margin-top: 0; padding-left: 56px; } - - .@{iconfont-css-prefix}-close { - position: absolute; - top: 8px; - right: 8px; - line-height: 1; - opacity: 1; - } } // ======================== Picture Card ======================== @@ -389,10 +368,6 @@ vertical-align: top; } - &.@{upload-prefix-cls}-list::after { - display: none; - } - .@{upload-item} { height: 100%; margin: 0; diff --git a/components/upload/style/rtl.less b/components/upload/style/rtl.less index 0dd9836eff..a7054731f0 100644 --- a/components/upload/style/rtl.less +++ b/components/upload/style/rtl.less @@ -72,13 +72,6 @@ } } - .@{iconfont-css-prefix}-close { - .@{upload-prefix-cls}-list-rtl & { - right: auto; - left: 4px; - } - } - &-error &-card-actions { .@{iconfont-css-prefix} { .@{upload-prefix-cls}-list-rtl & { @@ -145,13 +138,6 @@ padding-left: 0; } } - - .@{iconfont-css-prefix}-close { - .@{upload-prefix-cls}-list-rtl& { - right: auto; - left: 8px; - } - } } &-picture-card {