Make WordPress Core

Opened 3 years ago

Closed 2 months ago

#52828 closed defect (bug) (wontfix)

Twenty Twenty-One: Custom HTML Block Doesn't Align in Content

Reported by: mrjarbenne's profile mrjarbenne Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.6
Component: Bundled Theme Keywords: close
Focuses: css, template Cc:

Description

The Custom HTML block doesn't align to the content section of the theme, having no left margin.

Using the core Custom HTML block to add an iframe embed code seems to be missing the <figure> div that would centre the content within the body of the post, resulting in the embedded object to be aligned to the far left margin.

This doesn’t affect the editor, but does rear its head in the published post.

Steps to reproduce:

Add a Custom HTML Block to a new post
Paste an iFrame embed code in the resulting Field
Publish Post.

Here's a link to an example: https://hwdsb.staging.boreal321.com/2021/03/12/test-embed/
It's also an issue with the version of 2021 running on wordpress.com: https://mrjarbenne.wordpress.com/2021/03/16/test/

https://cldup.com/Lq8jxLMSE2.png

Change History (5)

#1 @poena
3 years ago

Hi,
this is not a bug, but intended.

This is a block designed to contain your own custom HTML. Adding a wrapper to the block in the theme might break the users HTML code.

If you do not want the block contents to be unstyled you need to add your own HTML to reflect that.

#2 @mrjarbenne
3 years ago

Thanks @poena for the quick response. This behaviour is a change from the other bundled themes, which continue to contain any block -- including the Custom HTML block -- within the entry-content div. Wouldn't adding additional HTML in that block, when other themes don't require it, break the display if users were to switch to an alternate theme (Twenty-Twenty for example).

https://cldup.com/yoPpmD1aRZ.gif

If additional HTML is required, is it possible that the preview within the editor should reflect that? Currently the editor behaves in a similar fashion to the other bundled themes, displaying the content within the established margins:

https://cldup.com/5iRAwGaBmD.png

Version 0, edited 3 years ago by mrjarbenne (next)

#3 @peterwilsoncc
3 years ago

  • Version changed from 5.7 to 5.6

#4 @karmatosed
2 months ago

  • Keywords close added

I am in agreement with @poena on this. For now, let's add the close keyword but we can always consider if an issue needs to be made within the editor itself - that might be the resolution here. Thank you everyone.

#5 @karmatosed
2 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thank you everyone, let's move this to close for now.

Note: See TracTickets for help on using tickets.