diff --git a/packages/editor/src/components/TreeNode2.tsx b/packages/editor/src/components/TreeNode2.tsx index 044c67eb..7cc05b2f 100644 --- a/packages/editor/src/components/TreeNode2.tsx +++ b/packages/editor/src/components/TreeNode2.tsx @@ -15,6 +15,7 @@ * * Changes: * - Added support for drag and drop + * - A row with no icon still gets an icon column */ import classNames from "classnames"; @@ -102,7 +103,11 @@ export class TreeNode2 extends React.Component> {
  • {this.maybeRenderCaret()} - + {/* A row with no icon keeps the column. Blueprint's Icon draws nothing without + one, and the name would then start where a row with an icon puts its icon. */} + {icon + ? + : } .bp5-tree-node-content{ + background-image: + linear-gradient(rgba($tree-chrome, 0.35), rgba($tree-chrome, 0.35)), + linear-gradient(rgba($tree-chrome, 0.07), rgba($tree-chrome, 0.07)); + background-repeat: no-repeat; + background-size: 2px 100%, 100% 100%; + + &::after{ + bottom: 0; + content: ""; + pointer-events: none; + position: absolute; + top: 0; + right: calc(100% - #{$tree-indent} * var(--tree-depth)); + width: calc(#{$tree-indent} * var(--tree-reference-depth)); + background-image: repeating-linear-gradient(to right, transparent 0 4px, rgba($tree-chrome, 0.35) 4px 5px, transparent 5px $tree-indent); + // 2 on and 3 off divides the 30px row, so the dots hold their phase from row to row. + mask-image: repeating-linear-gradient(to bottom, #000 0 2px, transparent 2px 5px); + } +} + // A preview light belongs to the document view, not to the file it shows. .tree-node-excluded > .bp5-tree-node-content .bp5-tree-node-label{ opacity: 0.5;