Skip to content

Commit 33886ed

Browse files
committed
Avoid duplicated CSS
1 parent 2b831ee commit 33886ed

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/node-renderer-default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ const NodeRendererDefault = ({
7474

7575
{node.expanded && !isDragging &&
7676
<div
77-
style={{ width: scaffoldBlockPxWidth, position: 'absolute' }}
78-
className={`${styles.lineBlock} ${styles.lineChildren}`}
77+
style={{ width: scaffoldBlockPxWidth }}
78+
className={styles.lineChildren}
7979
/>
8080
}
8181
</div>

src/node-renderer-default.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@import './tree-node.scss';
21
$row-padding: 10px;
32

43
.rowWrapper {
@@ -231,10 +230,16 @@ $row-padding: 10px;
231230
* Line for under a node with children
232231
*/
233232
.lineChildren {
234-
@extend .lineFullVertical;
233+
height: 100%;
234+
display: inline-block;
235+
position: absolute;
235236

236237
&::after {
237-
top: auto;
238+
content: '';
239+
position: absolute;
240+
background-color: black;
241+
width: 1px;
242+
left: 50%;
238243
bottom: 0;
239244
height: $row-padding;
240245
}

0 commit comments

Comments
 (0)