From 215c2fd7af4df18c158f10a1f1fe517416957842 Mon Sep 17 00:00:00 2001 From: afc163 Date: Wed, 21 Dec 2016 12:00:42 +0800 Subject: [PATCH] Fix nested Tabs style, close #4317 --- components/tabs/style/index.less | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/components/tabs/style/index.less b/components/tabs/style/index.less index 9b8375583c..9e4373d4be 100644 --- a/components/tabs/style/index.less +++ b/components/tabs/style/index.less @@ -190,27 +190,27 @@ } &:not(&-vertical) { - .@{tab-prefix-cls}-content { + > .@{tab-prefix-cls}-content { width: 100%; + + > .@{tab-prefix-cls}-tabpane { + flex-shrink: 0; + width: 100%; + transition: opacity 0.3s; + opacity: 1; + } + + > .@{tab-prefix-cls}-tabpane-inactive { + opacity: 0; + height: 0; + } } - .@{tab-prefix-cls}-content-animated { + > .@{tab-prefix-cls}-content-animated { display: flex; flex-direction: row; will-change: margin-left; transition: margin-left 0.3s @ease-in-out; } - - .@{tab-prefix-cls}-tabpane { - flex-shrink: 0; - width: 100%; - transition: opacity 0.3s; - opacity: 1; - } - - .@{tab-prefix-cls}-tabpane-inactive { - opacity: 0; - height: 0; - } } &-vertical { @@ -394,8 +394,8 @@ .no-flex, .@{tab-prefix-cls}-no-animation, .@{tab-prefix-cls}-vertical { - .@{tab-prefix-cls}-content { - &-animated { + > .@{tab-prefix-cls}-content { + > &-animated { transform: none!important; }