Skip to content

Commit

Permalink
Avoid flash of background color by moving gray background color to el…
Browse files Browse the repository at this point in the history
…ement that is not a compositing layer (#32747)
  • Loading branch information
gwwar authored and youknowriad committed Jun 24, 2021
1 parent e084717 commit bf83b61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,3 @@
bottom: 0;
}
}

.edit-post-layout .interface-interface-skeleton__content {
background-color: $gray-800;
}
5 changes: 5 additions & 0 deletions packages/edit-post/src/components/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
display: flex;
flex-flow: column;

// Gray preview overlay (desktop/tablet/mobile) is intentionally not set on an element with scrolling content like
// interface-interface-skeleton__content. This causes graphical glitches (flashes of the background color)
// when scrolling in Safari due to incorrect ordering of large compositing layers (GPU acceleration).
background-color: $gray-800;

// The button element easily inherits styles that are meant for the editor style.
// These rules enhance the specificity to reduce that inheritance.
// This is duplicated in edit-site.
Expand Down

0 comments on commit bf83b61

Please sign in to comment.