-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
Size Change: +716 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
@@ -105,3 +105,7 @@ | |||
font-size: $default-font-size; | |||
} | |||
} | |||
|
|||
.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover { |
There was a problem hiding this comment.
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.
This seems like a reasonable (and simple!) fix to me. I definitely don't think it's critical to have parallax in the preview panel, but I'd like to cc @jasmussen for a second opinion just to be sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this seems a fine fix, and a fine file to add the fix to. If you add a comment as Kjell suggests, this is a good one.
Description
Fixes: #30814
If the cover block has parallax set, and is contained in a pattern, the background image does not cover correctly due to the transforms that are applied to resize the block for the pattern preview panel size.
Due to the small size of the pattern preview version it probably makes more sense to just disable the fixed background in the this context.
To test
Before:
After: