From 9b667a877e9aeab4f02d94700ff4946a072f51f4 Mon Sep 17 00:00:00 2001 From: "david.lv" Date: Tue, 30 Jul 2019 10:54:47 +0800 Subject: [PATCH] fix: make timeline component show more comfort under none-white background color (#17959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Timeline): timeline在非白色背景色下显示异常 Closes https://github.com/ant-design/ant-design/issues/17927 * fix(Timeline): 反转模式下1px下移 Closes https://github.com/ant-design/ant-design/issues/17927 * fix(Timeline): 微调偏移量,尽可能和原白色背景下的间距相同 Closes https://github.com/ant-design/ant-design/issues/17927 * fix(Timeline): 微调偏移量,尽可能和原白色背景下的间距相同 Closes https://github.com/ant-design/ant-design/issues/17927 --- components/timeline/style/index.less | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/timeline/style/index.less b/components/timeline/style/index.less index 70307f2e85..8f1f2a1bb0 100644 --- a/components/timeline/style/index.less +++ b/components/timeline/style/index.less @@ -19,14 +19,15 @@ &-tail { position: absolute; - top: 0.75em; + top: 10px; left: 4px; - height: 100%; + height: calc(100% - 10px); border-left: @timeline-width solid @timeline-color; } &-pending &-head { font-size: @font-size-sm; + background-color: transparent; } &-pending &-tail { @@ -141,6 +142,7 @@ &&-pending &-item-last &-item-tail { display: block; + height: calc(100% - 14px); border-left: 2px dotted @timeline-color; } @@ -150,7 +152,9 @@ &&-reverse &-item-pending { .@{timeline-prefix-cls}-item-tail { + top: 15px; display: block; + height: calc(100% - 15px); border-left: 2px dotted @timeline-color; } .@{timeline-prefix-cls}-item-content {