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

performance: add more CSS containment to tree-view #1363

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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