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

Cover block: remove fixed background when cover block previewed in patterns list #31640

Merged
merged 2 commits into from
May 10, 2021
Merged
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
6 changes: 6 additions & 0 deletions packages/block-library/src/cover/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@
font-size: $default-font-size;
}
}

// Remove the parallax fixed background when in the patterns preview panel as it
// doesn't work with the transforms that are applied to resize the block in that context.
.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover {
Copy link
Contributor

@kjellr kjellr May 10, 2021

Choose a reason for hiding this comment

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

Might be worth adding a code comment to make it clear what this is doing.

background-attachment: scroll;
}