Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 798da0f

Browse files
author
Dariusz Niemczyk
committed
Improve layering for chat
Currently we have a lot of unnecessary layers being created in the app, which is extremely problematic on Windows when using Chrome, as it deoptimises fonts rendering due to layers mismatch; chrome's algorithm can't figure out if the layers won't resize or overlap so it creates a lot of additional layers, which has a side effect of turning off sub-pixel antialiasing on Windows. This is a first step to improve the layering in the entire app.
1 parent b5f377d commit 798da0f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

res/css/structures/_LeftPanel.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ $roomListCollapsedWidth: 68px;
2626
.mx_LeftPanel_wrapper {
2727
display: flex;
2828
max-width: 50%;
29+
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
30+
contain: layout paint;
2931

3032
.mx_LeftPanel_wrapper--user {
3133
background-color: $roomlist-bg-color;

res/css/structures/_RoomView.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ limitations under the License.
2020
flex: 1;
2121
position: relative;
2222
justify-content: center;
23+
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
24+
contain: strict;
2325
}
2426

2527
.mx_RoomView {
@@ -163,7 +165,6 @@ limitations under the License.
163165
flex: 1;
164166
display: flex;
165167
flex-direction: column;
166-
contain: content;
167168
}
168169

169170
.mx_RoomView_statusArea {

res/css/structures/_ScrollPanel.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ limitations under the License.
1515
*/
1616

1717
.mx_ScrollPanel {
18+
contain: strict;
1819

1920
.mx_RoomView_MessageList {
2021
position: relative;

0 commit comments

Comments
 (0)