-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Style variations preview is cut off #41177
Comments
I remember #40842 was adjusting things to do with iframes and styles. |
I think I was able to track down the problem. It's similar to the issue with the Pattern previews in WP 5.9. When the The main problem with this bug is that it's tough to test with Gutenberg active. I will try to create a POC patch. Screenshot |
I can confirm. Looks like a lot more styles are being applied to the These styles look to be applied straight to all We could fix this with something like the following. It is not very elegant but would be the quickest solution that could then be iterated on post-release.
|
@Mamaduka I just confirmed that adding the following to common.min.css does fix the problem. Not a great solution, but one nonetheless 🤷♂️
|
@ndiego, this is what I was thinking: packages/edit-site/src/components/global-styles/preview.js
@youknowriad, any preferences on we should add |
Yeah, that is a bit more elegant that my hack 🙌 |
I'm fine adding the min width to the iframe styles but let's ensure that it's added before the styles that come from the theme (themes can potentially override this right?) Also it's probably something that should only be added in the iframe, and not for all usage of EditorStyles |
The suggested fix above applies to the previews only, I assume these styles can leak to the main iframe too right? Don't we have any issues there? |
Most of the other iframes are larger than 240px. The better fix would be to avoid leaking these styles in iframes, but I'm not sure how :( |
Yes, let's just add it to the iframe component with a comment now. I don't think we can easily avoid the leaks without removing the compact CSS thing which we can't do. The other thing would be to figure out to split styles into two calls instead of one in Core depending on whether they're theme styles or core styles. |
Thank you all for jumping in and resolving this so quickly. |
Description
When using 6.0 RC 3, the style variations preview is now cut off. If I use GB 13.2.2, it shows up correctly so something must have changed recently. cc @ndiego as a heads up & @glendaviesnz since you chimed in on another similar issue @gziolo as co-core editor tech lead.
Here's another similar issue about the preview where you can see how this should appear #40699
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
What it looks like:
What it should look like:
Environment info
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: