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

Custom HTML block preview not same as the Frontend Views #52438

Closed
AlgorithmsUnlocks opened this issue Jul 7, 2023 · 2 comments
Closed

Custom HTML block preview not same as the Frontend Views #52438

AlgorithmsUnlocks opened this issue Jul 7, 2023 · 2 comments
Labels
[Feature] Blocks Overall functionality of blocks [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended

Comments

@AlgorithmsUnlocks
Copy link

Description

Custom HTML block preview not same as the Frontend Views

Step-by-step reproduction instructions

To reproduce the issue, you will need to follow the steps:

  1. Activate the Twenty-Fourteen theme.
  2. Choose the custom HTML block.
  3. Add a few heading tags to it.
  4. Check the preview in the HTML block and also the Frontend View

Screenshots, screen recording, code snippet

https://prnt.sc/72nMe8HmIr_S
https://prnt.sc/1dV9rgwAsEIS

Environment info

WordPress Version: 6.2.2

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

@sabernhardt
Copy link
Contributor

originally reported in Trac 58463

All direct child elements inside the block preview's div have no top or bottom margin.

body > div > * {
margin-top: 0 !important; /* Has to have !important to override inline styles. */
margin-bottom: 0 !important;
}

@jordesign jordesign added the [Status] Needs More Info Follow-up required in order to be actionable. label Jul 10, 2023
@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Jul 18, 2023
@skorasaurus
Copy link
Member

Thanks for reporting; I believe this is a duplicate of #35962 which has the same issue (the HTML block's preview does not have any margin)

@skorasaurus skorasaurus added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants