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

Commit

Permalink
Improve layering for chat
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dariusz Niemczyk committed Aug 24, 2021
1 parent c2a410c commit 30c4b55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions res/css/structures/_RoomView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ limitations under the License.
flex-direction: column;
flex: 1;
position: relative;
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
contain: strict;
}


Expand Down Expand Up @@ -163,6 +165,7 @@ limitations under the License.
flex: 1;
display: flex;
flex-direction: column;
// Contain the amount of layers rendered by constraining what actually needs re-layering via css
contain: content;
}

Expand Down
1 change: 1 addition & 0 deletions res/css/structures/_ScrollPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ limitations under the License.
*/

.mx_ScrollPanel {
contain: strict;

.mx_RoomView_MessageList {
position: relative;
Expand Down

0 comments on commit 30c4b55

Please sign in to comment.