Make WordPress Core

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

Button block alignment issue when aligned left or right and not justified

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.0
Component: Editor Keywords: has-patch
Focuses: css Cc:


Steps to reproduce the issue:-
Activate Twenty Twenty-two theme.
Choose button block.
Align the button to the left or centre it is working fine.
Now align the button to the right it will align our button in the left corner instead of the right.

I have attached a video for better understanding.
Video URL :-

Attachments (1)

56355.patch (6.6 KB) - added by nidhidhandhukiya 22 months ago.

Download all attachments as: .zip

Change History (3)

#1 @nidhidhandhukiya
22 months ago

  • Keywords has-patch added

We can also solve this issue in gutenberg.

.is-content-justification-center) .wp-block-button.alignright {
  /* stylelint-enable indentation */
  width: 100%;
  text-align: right;

We just need to add this css in our scss file and need to build.

#2 @sabernhardt
22 months ago

  • Component changed from Bundled Theme to Editor
  • Focuses css added
  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed
  • Summary changed from Twenty Twenty two button alignemnet issue when align right. to Button block alignment issue when aligned left or right and not justified

The left alignment does not exactly work either. In English, it naturally aligns to the left side.

Anyway, this was already reported in the Gutenberg repository, in issue 39937. Please follow and/or join that discussion.

Note: See TracTickets for help on using tickets.