From 2b75a65a5063d04c473be759357c045173439a9c Mon Sep 17 00:00:00 2001 From: William Cai Date: Thu, 3 Sep 2020 16:37:51 +0800 Subject: [PATCH] fix: restrict nested table styles to only apply to direct children of td --- 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 184099bd6c19..783311f7f459 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; - } - } - } - } } }