From 79b681d27c1734a2cfe1eca66d79d7f1ead7bee9 Mon Sep 17 00:00:00 2001 From: willc001 Date: Sun, 6 Sep 2020 13:21:40 +0800 Subject: [PATCH] fix: restrict nested table styles to only apply to direct children of td (#26568) Co-authored-by: William Cai --- components/table/style/index.less | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index e21626d8db..106106490f 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -106,6 +106,23 @@ > td { border-bottom: @border-width-base @border-style-base @border-color-split; transition: background 0.3s; + + // ========================= Nest Table =========================== + > .@{table-prefix-cls}-wrapper:only-child { + .@{table-prefix-cls} { + margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal + + ceil(@font-size-sm * 1.4)); + + &-tbody > tr:last-child > td { + border-bottom: 0; + + &:first-child, + &:last-child { + border-radius: 0; + } + } + } + } } &.@{table-prefix-cls}-row:hover { @@ -126,23 +143,6 @@ } } } - - // ========================= Nest Table =========================== - .@{table-prefix-cls}-wrapper:only-child { - .@{table-prefix-cls} { - margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal + - ceil(@font-size-sm * 1.4)); - - &-tbody > tr:last-child > td { - border-bottom: 0; - - &:first-child, - &:last-child { - border-radius: 0; - } - } - } - } } }