From e11da52bf7c55a7dde417d1cfdd19a4cd82873c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Wed, 26 Aug 2020 13:43:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Table=20Expand=20Icon=20s?= =?UTF-8?q?ize=20issue=20(#26409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - https://github.com/ant-design/ant-design/issues/24719 Expand Icon * - https://github.com/ant-design/ant-design/issues/24719 Expand Icon Co-authored-by: Gary Wei --- components/table/style/index.less | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index b12e70af67..184099bd6c 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -412,12 +412,13 @@ float: left; box-sizing: border-box; - width: ceil(@font-size-sm * 1.4); - height: ceil(@font-size-sm * 1.4); + width: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3; + height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * 3; padding: 0; color: inherit; - line-height: @font-size-sm; - vertical-align: floor((@font-size-base - ceil(@font-size-sm * 1.4)) / 2); + line-height: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2) * 2 + @border-width-base * + 3; + // vertical-align: floor((@font-size-base - ceil(@font-size-sm * 1.4)) / 2); background: @table-expand-icon-bg; border: @border-width-base @border-style-base @border-color-split; border-radius: @border-radius-base; @@ -440,7 +441,7 @@ } &::before { - top: 7px; + top: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); right: 3px; left: 3px; height: @border-width-base; @@ -449,7 +450,7 @@ &::after { top: 3px; bottom: 3px; - left: 7px; + left: ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); width: @border-width-base; transform: rotate(90deg); } @@ -474,7 +475,8 @@ } .@{table-prefix-cls}-row-indent + & { - margin-top: (@font-size-base * @line-height-base - ceil(@font-size-sm * 1.4)) / 2; + margin-top: (@font-size-base * @line-height-base - @border-width-base * 3) / 2 - + ceil((@font-size-sm * 1.4 - @border-width-base * 3) / 2); margin-right: @padding-xs; } }