|
13 | 13 | * limitations under the License. |
14 | 14 | */ |
15 | 15 |
|
16 | | -.treeWithDeepNesting { |
| 16 | +.treeView { |
17 | 17 | --treeitem-color: light-dark(rgb(0 0 0 / 0.8), rgb(255 255 255 / 0.8)); |
18 | 18 | --treeitem-bg-color: light-dark(rgb(0 0 0 / 0.15), rgb(255 255 255 / 0.15)); |
19 | 19 | --treeitem-hover-color: light-dark(rgb(0 0 0 / 0.9), rgb(255 255 255 / 0.9)); |
|
28 | 28 | --treeitem-expanded-icon: url(images/treeitem-expanded.svg); |
29 | 29 | --treeitem-collapsed-icon: url(images/treeitem-collapsed.svg); |
30 | 30 |
|
31 | | - .treeItemToggler::before { |
32 | | - /* All matching images have a size of 16x16 |
33 | | - * All relevant containers have a size of 28x28 */ |
34 | | - position: absolute; |
35 | | - display: inline-block; |
36 | | - width: 16px; |
37 | | - height: 16px; |
| 31 | + &.withNesting { |
| 32 | + .treeItemToggler { |
| 33 | + &::before { |
| 34 | + /* All matching images have a size of 16x16 |
| 35 | + * All relevant containers have a size of 28x28 */ |
| 36 | + position: absolute; |
| 37 | + display: inline-block; |
| 38 | + width: 16px; |
| 39 | + height: 16px; |
| 40 | + inset-inline-end: 4px; |
| 41 | + |
| 42 | + content: ""; |
| 43 | + background-color: var(--toolbar-icon-bg-color); |
| 44 | + mask-image: var(--treeitem-expanded-icon); |
| 45 | + mask-size: cover; |
| 46 | + } |
| 47 | + |
| 48 | + position: relative; |
| 49 | + float: var(--inline-start); |
| 50 | + height: 0; |
| 51 | + width: 0; |
| 52 | + color: rgb(255 255 255 / 0.5); |
| 53 | + |
| 54 | + &.treeItemsHidden { |
| 55 | + &::before { |
| 56 | + mask-image: var(--treeitem-collapsed-icon); |
| 57 | + transform: scaleX(var(--dir-factor)); |
| 58 | + } |
| 59 | + |
| 60 | + ~ .treeItems { |
| 61 | + display: none; |
| 62 | + } |
| 63 | + } |
| 64 | + |
| 65 | + &:hover + a, |
| 66 | + &:hover ~ .treeItems { |
| 67 | + background-color: var(--treeitem-bg-color); |
| 68 | + background-clip: padding-box; |
| 69 | + border-radius: 2px; |
| 70 | + color: var(--treeitem-hover-color); |
| 71 | + } |
| 72 | + } |
38 | 73 |
|
39 | | - content: ""; |
40 | | - background-color: var(--toolbar-icon-bg-color); |
41 | | - mask-size: cover; |
| 74 | + > .treeItem, |
| 75 | + .treeItem > .treeItems { |
| 76 | + margin-inline-start: 20px; |
| 77 | + } |
42 | 78 | } |
43 | 79 |
|
44 | 80 | &#layersView .treeItem > a { |
|
47 | 83 | } |
48 | 84 |
|
49 | 85 | > label { |
| 86 | + display: flex; |
| 87 | + align-items: center; |
50 | 88 | padding-inline-start: 4px; |
51 | 89 | > input { |
52 | | - float: var(--inline-start); |
53 | 90 | margin-top: 1px; |
54 | 91 | } |
55 | 92 | } |
56 | 93 | } |
57 | 94 |
|
58 | | - > .treeItem, |
59 | | - .treeItem > .treeItems { |
60 | | - margin-inline-start: 20px; |
61 | | - } |
62 | | - |
63 | 95 | .treeItem { |
64 | 96 | > a { |
65 | 97 | text-decoration: none; |
|
76 | 108 | line-height: 15px; |
77 | 109 | user-select: none; |
78 | 110 | white-space: normal; |
79 | | - cursor: pointer; |
| 111 | + cursor: default; |
80 | 112 |
|
81 | 113 | &:hover { |
82 | 114 | background-color: var(--treeitem-bg-color); |
|
91 | 123 | color: var(--treeitem-selected-color); |
92 | 124 | } |
93 | 125 | } |
94 | | - |
95 | | - .treeItemToggler { |
96 | | - position: relative; |
97 | | - float: var(--inline-start); |
98 | | - height: 0; |
99 | | - width: 0; |
100 | | - color: rgb(255 255 255 / 0.5); |
101 | | - |
102 | | - &::before { |
103 | | - inset-inline-end: 4px; |
104 | | - mask-image: var(--treeitem-expanded-icon); |
105 | | - } |
106 | | - |
107 | | - &.treeItemsHidden { |
108 | | - &::before { |
109 | | - mask-image: var(--treeitem-collapsed-icon); |
110 | | - transform: scaleX(var(--dir-factor)); |
111 | | - } |
112 | | - |
113 | | - ~ .treeItems { |
114 | | - display: none; |
115 | | - } |
116 | | - } |
117 | | - |
118 | | - &:hover:is(+ a, ~ .treeItems) { |
119 | | - background-color: var(--treeitem-bg-color); |
120 | | - background-clip: padding-box; |
121 | | - border-radius: 2px; |
122 | | - color: var(--treeitem-hover-color); |
123 | | - } |
124 | | - } |
125 | 126 | } |
0 commit comments