Using viewheight for blocks in patterns creates weird previews #43865
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Type] Bug
An existing feature does not function as intended
Description
The Cover block is a good example of a block that makes good use of the viewheight unit.
In pattern previews (in the pattern sidebar, explorer or page creation modal) this creates a problem where things are not scaled accordingly and even weirdly so. This used to be workable. But in the page creation previews, this problem becomes a bit more prevalent.
Page creation modal is also less friendly, with displaying a disrupting flickering pattern for a page with a vh container in it. Using the
* Viewport Width = 1920px
in the file header removes the flickering, but the scale is still very off, especially compared to other patterns.I think this is a bug, yet it behaves exactly as it should (it scales to vh / vw), but this is not usable in pattern previews when they are a bit more lengthy.
Step-by-step reproduction instructions
* Block Types: core/post-content
in the header.Screenshots, screen recording, code snippet
No response
Environment info
WordPress 6.0.1 (& 6.0.2)
No Gutenberg
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: