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

Commit

Permalink
performance: add more css containment to tree-view
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Oct 14, 2020
1 parent bf1181d commit 6996d68
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion styles/tree-view.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
-webkit-user-drag: element;
}

@contain_all: size layout paint style;
@contain_except_size: layout paint style;

.tree-view {
contain: size;
contain: @contain_all;
overflow: auto;
z-index: 2;
-webkit-user-select: none;
Expand All @@ -14,6 +17,7 @@
flex-direction: column;

#add-projects-view {
contain: @contain_all;
display: flex;
flex: 1;
flex-direction: column;
Expand All @@ -37,6 +41,7 @@
}

.icon-large::before {
contain: @contain_except_size;
margin-right: 0;
margin-bottom: 50px;
width: auto;
Expand All @@ -45,6 +50,7 @@
}

.tree-view-root {
contain: @contain_except_size;
padding-left: @component-icon-padding;
padding-right: @component-padding;
background-color: inherit;
Expand Down Expand Up @@ -74,15 +80,18 @@
}

.header {
contain: @contain_except_size;
position: relative;
}

.tree-view-root .list-tree {
contain: @contain_except_size;
// Keeps selections expanded while dragging
position: static;
}

.entry {
contain: style;
// This fixes #110, see that issue for more details
&::before {
content: '';
Expand All @@ -92,6 +101,7 @@

/* Drag and Drop */
.placeholder {
contain: @contain_all;
position: absolute;
left: @component-icon-padding;
padding: 0;
Expand Down

0 comments on commit 6996d68

Please sign in to comment.