Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 6996d68

Browse files
committed
performance: add more css containment to tree-view
1 parent bf1181d commit 6996d68

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

styles/tree-view.less

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
-webkit-user-drag: element;
55
}
66

7+
@contain_all: size layout paint style;
8+
@contain_except_size: layout paint style;
9+
710
.tree-view {
8-
contain: size;
11+
contain: @contain_all;
912
overflow: auto;
1013
z-index: 2;
1114
-webkit-user-select: none;
@@ -14,6 +17,7 @@
1417
flex-direction: column;
1518

1619
#add-projects-view {
20+
contain: @contain_all;
1721
display: flex;
1822
flex: 1;
1923
flex-direction: column;
@@ -37,6 +41,7 @@
3741
}
3842

3943
.icon-large::before {
44+
contain: @contain_except_size;
4045
margin-right: 0;
4146
margin-bottom: 50px;
4247
width: auto;
@@ -45,6 +50,7 @@
4550
}
4651

4752
.tree-view-root {
53+
contain: @contain_except_size;
4854
padding-left: @component-icon-padding;
4955
padding-right: @component-padding;
5056
background-color: inherit;
@@ -74,15 +80,18 @@
7480
}
7581

7682
.header {
83+
contain: @contain_except_size;
7784
position: relative;
7885
}
7986

8087
.tree-view-root .list-tree {
88+
contain: @contain_except_size;
8189
// Keeps selections expanded while dragging
8290
position: static;
8391
}
8492

8593
.entry {
94+
contain: style;
8695
// This fixes #110, see that issue for more details
8796
&::before {
8897
content: '';
@@ -92,6 +101,7 @@
92101

93102
/* Drag and Drop */
94103
.placeholder {
104+
contain: @contain_all;
95105
position: absolute;
96106
left: @component-icon-padding;
97107
padding: 0;

0 commit comments

Comments
 (0)