Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with editor styles and fullscreen (#10024)
This is a curious one. The topbar in WordPress takes up some space in the editing canvas. When fullscreen mode is engaged, we invoke a negative vertical margin to offset this. But this means the _body_ element is no longer 100% tall, because 32px have been cropped off. So what happens when an editor style colorizes the body element? Well normally even though the body element isn't as tall as the viewport, it floods the whole thing. See https://css-tricks.com/just-one-of-those-weird-things-about-css-background-on-body/ for all the details. But in this case, we have a background color on the HTML element. And we need to have that, because otherwise we can't use mix-blend-mode when selecting multiple blocks. This is due to a bug in Chrome where this feature doesn't work unless a background color that isn't none or transparent is explicitly set on the html element. So there we go — and that's why this PR uses calc to set the height on the body element.
- Loading branch information