Make WordPress Core

Opened 3 years ago

Closed 3 years ago

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

Custom HTML block preview not same as the Frontend Views

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

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
3 years ago

  • Component General → Bundled Theme
  • Version trunk

#3 @sabernhardt
3 years ago

  • Component Bundled Theme → Editor
  • Keywords move-to-github close added; has-patch removed
  • Summary Twenty Fourteen: Custom HTML block preview not same as the Frontend Views → 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
3 years ago

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

#5 @sabernhardt
3 years ago

  • Keywords move-to-github close removed
  • Milestone Awaiting Review
  • Resolution → reported-upstream
  • Status new → closed

Thanks for moving the report!

Note: See TracTickets for help on using tickets.