fix: make timeline component show more comfort under none-white background color (#17959)

* 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
This commit is contained in:
david.lv 2019-07-30 10:54:47 +08:00 committed by 偏右
parent f41e013ce5
commit 9b667a877e

View File

@ -19,14 +19,15 @@
&-tail { &-tail {
position: absolute; position: absolute;
top: 0.75em; top: 10px;
left: 4px; left: 4px;
height: 100%; height: calc(100% - 10px);
border-left: @timeline-width solid @timeline-color; border-left: @timeline-width solid @timeline-color;
} }
&-pending &-head { &-pending &-head {
font-size: @font-size-sm; font-size: @font-size-sm;
background-color: transparent;
} }
&-pending &-tail { &-pending &-tail {
@ -141,6 +142,7 @@
&&-pending &-item-last &-item-tail { &&-pending &-item-last &-item-tail {
display: block; display: block;
height: calc(100% - 14px);
border-left: 2px dotted @timeline-color; border-left: 2px dotted @timeline-color;
} }
@ -150,7 +152,9 @@
&&-reverse &-item-pending { &&-reverse &-item-pending {
.@{timeline-prefix-cls}-item-tail { .@{timeline-prefix-cls}-item-tail {
top: 15px;
display: block; display: block;
height: calc(100% - 15px);
border-left: 2px dotted @timeline-color; border-left: 2px dotted @timeline-color;
} }
.@{timeline-prefix-cls}-item-content { .@{timeline-prefix-cls}-item-content {