Make WordPress Core

#58463 closed defect (bug) (reported-upstream)

Custom HTML block preview not same as the Frontend Views

Reported by: algorithmsunlocks's profile algorithmsunlocks Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: ui, css, administration Cc:

Description

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

Have a look at the below screenshot.
https://prnt.sc/72nMe8HmIr_S
https://prnt.sc/1dV9rgwAsEIS

Change History (5)

#2 @desrosj
20 months ago

  • Component changed from General to Bundled Theme
  • Version trunk deleted

#3 @sabernhardt
20 months ago

  • Component changed from Bundled Theme to Editor
  • Keywords move-to-github close added; has-patch removed
  • Summary changed from Twenty Fourteen: Custom HTML block preview not same as the Frontend Views to Custom HTML block preview not same as the Frontend Views

This is an editor problem that can happen with any theme.

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

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

(from sandbox/index.tsx)

If you could, please open an issue on the Gutenberg repository.

#4 @algorithmsunlocks
19 months ago

I have opened a bug report to the WordPress Gutenberg GitHub repo: https://github.com/WordPress/gutenberg/issues/52438

#5 @sabernhardt
19 months ago

  • Keywords move-to-github close removed
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Thanks for moving the report!

Note: See TracTickets for help on using tickets.