Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try: Fix overlay blur flickering. #55032

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.wp-block-post-featured-image {
.block-editor-media-placeholder {
z-index: 1; // Need to put it above the overlay so the upload button works.
backdrop-filter: none; // Removes background blur so the overlay's actual color is visible.
//backdrop-filter: none; // Removes background blur so the overlay's actual color is visible.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case this PR moves forward, want to remove this one. (Note to self)

}

// Style the placeholder.
Expand Down
17 changes: 15 additions & 2 deletions packages/components/src/placeholder/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@
// This is mainly an issue in terms of Site Logo which has a brief flash of the square placeholder.
.components-placeholder.has-illustration {
color: inherit;
display: flex;
box-shadow: none;

// Blur the background so layered dashed placeholders are still visually separate.
Expand All @@ -182,7 +181,11 @@
}

.components-placeholder__fieldset {
width: auto;
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
justify-content: center;

// Unset intrinsic margins.
margin-left: 0;
Expand Down Expand Up @@ -212,6 +215,16 @@
// By painting the borders here, we enable them to be replaced by the Border control.
@include placeholder-style();
overflow: auto;

// Fix a flickering that happens in the blur when transforms are applied.
// This hack would be good to remove in case https://bugs.chromium.org/p/chromium/issues/detail?id=986206 gets fixed.
&.has-illustration {
display: inline-block;
width: calc(100% - 3px);
height: auto;
margin: 1.5px;
vertical-align: bottom;
}
}

// Position the spinner.
Expand Down
Loading