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

Commit 5479ef9

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

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

styles/tree-view.less

Lines changed: 9 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;
@@ -45,6 +48,7 @@
4548
}
4649

4750
.tree-view-root {
51+
contain: @contain_except_size;
4852
padding-left: @component-icon-padding;
4953
padding-right: @component-padding;
5054
background-color: inherit;
@@ -74,15 +78,18 @@
7478
}
7579

7680
.header {
81+
contain: @contain_except_size;
7782
position: relative;
7883
}
7984

8085
.tree-view-root .list-tree {
86+
contain: @contain_except_size;
8187
// Keeps selections expanded while dragging
8288
position: static;
8389
}
8490

8591
.entry {
92+
contain: style;
8693
// This fixes #110, see that issue for more details
8794
&::before {
8895
content: '';
@@ -92,6 +99,7 @@
9299

93100
/* Drag and Drop */
94101
.placeholder {
102+
contain: @contain_all;
95103
position: absolute;
96104
left: @component-icon-padding;
97105
padding: 0;

0 commit comments

Comments
 (0)