Make WordPress Core

Opened 9 months ago

Closed 6 months ago

#61132 closed defect (bug) (fixed)

Twenty Twenty: Quote block border does not reflect text alignment on front-end

Reported by: viralsampat's profile viralsampat Owned by: karmatosed's profile karmatosed
Milestone: 6.7 Priority: normal
Severity: normal Version: 5.3
Component: Bundled Theme Keywords: has-patch needs-testing commit
Focuses: ui, css Cc:

Description

Hello all,

I have reviewed the "Quote" block into the twenty-twenty theme and found that its align text functionality is not working properly in the front-end site.

When we change "Quote" block align text to "Align Text Right" then in editor side its working and move left border to right side and also changed text align from left to right.

But, when we checked it to front-end side it changed only text from left to right. The border is displaying as it it on the left end side. I think that it should be change from left to right as well.

For better understanding I have attached its screenshots at bottom of the page.

Thanks,

Attachments (8)

twenty-twenty-quote-editor.png (338.4 KB) - added by viralsampat 9 months ago.
Back-end
twenty-twenty-quote-front-end.png (372.8 KB) - added by viralsampat 9 months ago.
Front-end
61132.patch (419 bytes) - added by viralsampat 9 months ago.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
twenty-twenty-quote-editor_2.png (330.7 KB) - added by viralsampat 9 months ago.
After resolved issue Back-end:
twenty-twenty-quote-front-end-2.png (381.3 KB) - added by viralsampat 9 months ago.
After resolved issue front-end:
SCR-20240723-oadu.png (30.6 KB) - added by karmatosed 6 months ago.
SCR-20240723-oaff.png (47.3 KB) - added by karmatosed 6 months ago.
61132.1.patch (1.1 KB) - added by sabernhardt 6 months ago.
use text alignment classes with existing rules

Download all attachments as: .zip

Change History (15)

@viralsampat
9 months ago

I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.

@viralsampat
9 months ago

After resolved issue Back-end:

@viralsampat
9 months ago

After resolved issue front-end:

#1 @poena
9 months ago

Hi

So, the problem is with the border, not the text alignment?

#2 @karmatosed
6 months ago

  • Keywords has-patch needs-testing added; dev-feedback removed

I think I have worked out the steps to this just to confirm.

  1. Select a quote block.
  2. Align it left.
  3. The border stays where expected front and back.
  4. Align it right.
  5. The border stays where expected in the editor but not on the front of the site.

I have uploaded some screenshots to show this.

As a result a solution should resolve this and I haven't tested the attached PR but I will do that.

#3 @karmatosed
6 months ago

  • Milestone changed from Awaiting Review to 6.7

@sabernhardt
6 months ago

use text alignment classes with existing rules

#4 @karmatosed
6 months ago

  • Owner set to karmatosed
  • Status changed from new to assigned

Thank you @sabernhardt I am going to test this and look at progressing.

#5 @sabernhardt
6 months ago

  • Summary changed from Twenty Twenty Theme: Quote block align text is not working properly in front-end side. to Twenty Twenty: Quote block border does not reflect text alignment on front-end
  • Version changed from 6.5 to 5.3

While Twenty Twenty was built, the editor had used style attributes for text alignment. Since 5.3, the Quote block has used class names for alignment. I made a patch to update the existing rules for center- and right-aligned Quote blocks.

#6 @karmatosed
6 months ago

  • Keywords commit added

I can confirm in testing this patch resolves it, thank you @sabernhardt. I am now moving this to commit.

#7 @karmatosed
6 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 58796:

Twenty Twenty: Fixes Quote block border not reflecting alignment.

This resolves the border not also aligning with the quote block. When this theme was built the editor used style attributes for text alignment. This patch updates existing rules for center and right aligned quote blocks.

Props viralsampat, poena, sabernhardt.
Fixes #61132.

Note: See TracTickets for help on using tickets.