From f7e9a7c98834f2183db352506921adef38fd0166 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Fri, 17 May 2019 18:14:30 +0800 Subject: [PATCH] fix(module:tree,tree-select): fix the styles of connecting line (#3385) * fix(module:tree,tree-select): fix the styles of connecting line * fix(module:tree): fix styles * fix(module:tree-select): fix file name close #3382 --- components/tree-select/style/entry.less | 1 + components/tree-select/style/patch.less | 9 ++++++ components/tree/style/patch.less | 43 ++++++++----------------- 3 files changed, 24 insertions(+), 29 deletions(-) create mode 100644 components/tree-select/style/patch.less diff --git a/components/tree-select/style/entry.less b/components/tree-select/style/entry.less index 580b38c62b1..94ea4fdd315 100644 --- a/components/tree-select/style/entry.less +++ b/components/tree-select/style/entry.less @@ -4,3 +4,4 @@ @import '../../tree/style/entry.less'; @import '../../select/style/index.less'; @import '../../empty/style/index.less'; +@import "./patch.less"; diff --git a/components/tree-select/style/patch.less b/components/tree-select/style/patch.less new file mode 100644 index 00000000000..126247944b6 --- /dev/null +++ b/components/tree-select/style/patch.less @@ -0,0 +1,9 @@ +.ant-tree.ant-select-tree.ant-tree-show-line nz-tree-node:not(:last-child) > li::before { + content: ' '; + width: 1px; + border-left: 1px solid #d9d9d9; + height: calc(100% - 16px); + position: absolute; + left: 12px; + margin: 26px 0; +} \ No newline at end of file diff --git a/components/tree/style/patch.less b/components/tree/style/patch.less index adce7cea729..054172de2a4 100644 --- a/components/tree/style/patch.less +++ b/components/tree/style/patch.less @@ -6,34 +6,19 @@ * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ -.ant-tree { - &.ant-tree-show-line { - > nz-tree-node:not(:last-child), .ant-tree-child-tree > nz-tree-node:not(:last-child) { - > li:before { - content: ' '; - width: 1px; - border-left: 1px solid @border-color-base; - height: 100%; - position: absolute; - left: 12px; - margin: 22px 0; - } - } - - .ant-tree-child-tree > nz-tree-node:last-child { - > li:before { - content: ' '; - width: 1px; - border-left: 0px solid @border-color-base; - height: 100%; - position: absolute; - left: 12px; - margin: 22px 0; - } - } - } +.ant-tree.ant-tree-show-line nz-tree-node:not(:last-child) > li::before { + content: ' '; + width: 1px; + border-left: 1px solid @border-color-base; + height: 100%; + position: absolute; + left: 12px; + margin: 22px 0; +} - .font-highlight { - color: @highlight-color; - } +.font-highlight { + color: @highlight-color; } + + +