|
3 | 3 | color: white;
|
4 | 4 | }
|
5 | 5 |
|
6 |
| -.tree-item:hover .on-item-hover { |
7 |
| - display: block; |
| 6 | +.tree-item:hover .on-item-hover{ |
| 7 | +display: block; |
8 | 8 | }
|
9 | 9 |
|
10 |
| -.tree-item .on-item-hover { |
11 |
| - display: none; |
| 10 | +.tree-item .on-item-hover{ |
| 11 | +display: none; |
12 | 12 | }
|
13 | 13 |
|
14 |
| -.tree-item-node:hover li>.on-item-hover { |
15 |
| - display: block; |
| 14 | +.tree-item-node:hover li > .on-item-hover{ |
| 15 | +display: block; |
| 16 | +} |
| 17 | + |
| 18 | +.tree-item-node li > .on-item-hover{ |
| 19 | +display: none; |
16 | 20 | }
|
17 | 21 |
|
18 | 22 |
|
19 |
| -.tree-item-node li>.on-item-hover { |
20 |
| - display: none; |
| 23 | +.no-guide .tree-item-node { |
| 24 | +border: none !important; |
| 25 | +} |
| 26 | +.no-guide .tree-item-node::before { |
| 27 | +border: none !important; |
| 28 | +} |
| 29 | + |
| 30 | +.no-guide .guide-line { |
| 31 | +border: none !important; |
| 32 | +} |
| 33 | + |
| 34 | +.no-guide .guide-line::before { |
| 35 | +border: none !important; |
| 36 | +} |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +/** |
| 41 | + * Create Vertical Guideline |
| 42 | + * Add a dashed border to the left of all but the last child in a parent node. |
| 43 | + * There will be a gap between the bottom of this tree-item-node and the top of the next sibling. |
| 44 | + */ |
| 45 | + .node-child .tree-item-node-parent .tree-item-node:not(:last-child) { |
| 46 | + position: relative; |
| 47 | + border-left: 1px dashed rgb(192, 192, 192); |
| 48 | + border-radius: 0; |
| 49 | +} |
| 50 | + |
| 51 | +/** |
| 52 | + * Fill in gap on Vertical Guideline |
| 53 | + * use the ::before pseudo-element to create a dashed line that extends down to the next sibling. |
| 54 | + * This will be applied to all but the last child in a parent node, and fill in the gap mentioned above. |
| 55 | + */ |
| 56 | + .node-child .tree-item-node-parent .tree-item-node:not(:last-child)::before { |
| 57 | + content: ""; |
| 58 | + position: absolute; |
| 59 | + top: 100%; /* Extend below the actual element */ |
| 60 | + left: -1px; /* Match the border-left width */ |
| 61 | + height: 1em; /* Adjust the desired height */ |
| 62 | + border-left: 1px dashed rgb(192, 192, 192); |
| 63 | +} |
| 64 | + |
| 65 | + |
| 66 | +.tree-item-node:only-child .tree-view-item{ |
| 67 | + position: relative; /* Needed to position the ::before pseudo-element */ |
| 68 | +} |
| 69 | + |
| 70 | +/** |
| 71 | +* Create Vertical Guideline for only-children |
| 72 | +* Since we rely on the previous sibling to fill in the gap by extending down, |
| 73 | +* only-child elements will need to extend up to fill in the gap. |
| 74 | +*/ |
| 75 | +.node-child .tree-item-node-parent .tree-item-node:only-child > .tree-view-item > .guide-line::before { |
| 76 | + content: ""; |
| 77 | + position: absolute; |
| 78 | + bottom: 50%; /* Extend above the actual element */ |
| 79 | + left: -1px; /* Match the border-left width */ |
| 80 | + height: 1em; /* Extend 20px above the element */ |
| 81 | + border-left: 1px dashed rgb(192, 192, 192); |
21 | 82 | }
|
22 | 83 |
|
23 | 84 |
|
|
99 | 160 | .node-child {
|
100 | 161 | text-align: left;
|
101 | 162 | display: block;
|
102 |
| - border-left: 1px dashed rgb(192, 192, 192); |
103 | 163 | }
|
104 | 164 |
|
105 | 165 | .hide {
|
|
114 | 174 | box-sizing: border-box;
|
115 | 175 | position: relative;
|
116 | 176 | display: block;
|
117 |
| - transform: scale(var(--ggs, 1)); |
| 177 | + transform: scale(var(--ggs,1)); |
118 | 178 | width: 22px;
|
119 | 179 | height: 22px;
|
120 | 180 | border: 2px solid transparent;
|
|
0 commit comments