From 3d2ccd80813d002ff10630225cefcdea34a6095d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Mon, 4 May 2020 18:14:25 +0800 Subject: [PATCH] refactor: Use flex of divider (#23849) * refactor: Use flex of divider * fix style lint --- components/divider/style/index.less | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/components/divider/style/index.less b/components/divider/style/index.less index eaec84dc46..8c76b92ebb 100644 --- a/components/divider/style/index.less +++ b/components/divider/style/index.less @@ -7,41 +7,40 @@ .@{divider-prefix-cls} { .reset-component; - background: @border-color-split; + border-top: 1px solid @border-color-split; &-vertical { position: relative; top: -0.06em; display: inline-block; - width: 1px; height: 0.9em; margin: 0 8px; vertical-align: middle; + border-top: 0; + border-left: 1px solid @border-color-split; } &-horizontal { - display: block; + display: flex; clear: both; width: 100%; min-width: 100%; // Fix https://github.com/ant-design/ant-design/issues/10914 - height: 1px; margin: 24px 0; } &-horizontal&-with-text { - display: table; + display: flex; margin: 16px 0; color: @heading-color; font-weight: 500; font-size: @font-size-lg; white-space: nowrap; text-align: center; - background: transparent; + border-top: 0; &::before, &::after { position: relative; top: 50%; - display: table-cell; width: 50%; border-top: 1px solid @border-color-split; transform: translateY(50%);