Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#47787 closed defect (bug) (wontfix)

Gutenberg Image align

Reported by: AmirHossein7464 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.2.2
Component: Editor Keywords:
Focuses: ui Cc:


Hi, Gutenberg aligned image was aligned with CSS float property.

  1. There is not any clearfix (clear:both) for image container to avoid any problem to other next elements.
  2. Is not better to set text-align for image container?

Change History (2)

#1 @AmirHossein7464
2 years ago

May i does not explained correctly.
When I insert a image block in editor and set its align any where (left/center/right) this will change the next elements layout.
I found the problem is because float CSS property that assigned to figure element.
This need assigne clear:both to container of figure element (wp-block-image)

#2 @talldanwp
2 years ago

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

Hi @AmirHossein7464. Thanks for creating the ticket. For future reference, Gutenberg/Block Editor tickets can be created over on the github repo:

Floats not being cleared is the desired functionality, as it allows text to wrap around floated images. There's been some discussion on this in the past in [GB4127]. The workaround at the moment is that you can add a custom class to the block you want to clear. They can be added in the Advanced section in the sidebar for a block.

There's also some work on [GB16780] to improve how floats work.

I'm going to close this issue as something that won't be fixed, but feel free to leave any further feedback. I'd recommend feeding back on one of the linked github issues, though.

Note: See TracTickets for help on using tickets.