-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
HTML Preview not displaying correctly for some themes #13414
Comments
As this is a regression in the packages that WordPress 5.1 has imported, I'm adding it to the WordPress 5.1 milestone. |
This is not a regression in 5.1 AFAIK. |
As a strawman idea: set |
Yes, I think we should reset margin and padding in the HTML block preview as these are only meant for the full editor styles. |
This is likely already partially done for style variation previews and block previews. Would it make sense to look into a mixin, or other way to semi-automate this? |
I don't think we can reuse things here as the styles must be applied inside the iframe (in JS) |
Describe the bug
This seems to be a regression introduced by #13080
For some themes (Twenty Seventeen, Twenty Sixteen, Twenty Fifteen) the Custom HTML block's preview is not displaying correctly:
The cause seems to be that those themes have some styles on the
body
element that are now being included in the preview. In the case of Twenty Seventeen:This margin is causing the content to overflow the preview.
To Reproduce
Steps to reproduce the behavior:
<div>test</div>
Expected behavior
The preview should be displayed clearly without the need to scroll.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
The text was updated successfully, but these errors were encountered: