Make WordPress Core

Opened 21 months ago

Last modified 4 weeks ago

#61433 new defect (bug)

Twenty Twenty: The Media & Text block paragraph text not align properly when change media size.

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5.4
Component: Bundled Theme Keywords: dev-feedback changes-requested
Focuses: css Cc:

Description

Hello Team,

I have reviewed the "Media & Text" block and found that when we change media with from block setting "MEDIA WIDTH" to full width, The block paragraph text not align properly on front-end.

I have checked this scenario in other themes and its looks good on it.

So, I think that it should be same on both(Back-end & Front-end) sides.

Here, I have provided issue video: https://www.awesomescreenshot.com/video/28611147?key=3f7fc3967a017dcdd4ddddd5ddd8fc57

Environment info:


  • WordPress version: WordPress 6.5.4 running,
  • Themes:
    • Twenty Twenty: Version: 2.6
  • Browser: Google Chrome, Version 126.0.6478.56 (Official Build) (arm64)
  • Device: MacBook Air M1
  • OS: macOS 14.5 (23F79)
  • Gutenberg plugin: Version Version 18.5.0

Thanks,

Attachments (5)

61433.patch (695 bytes) - added by viralsampat 21 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.
before-change-media-and-text-block-back-end.png (766.2 KB) - added by viralsampat 21 months ago.
Back-end
before-change-media-and-text-front-end.png (975.8 KB) - added by viralsampat 21 months ago.
Front-end
after-change-media-and-text-block-back-end.png (765.8 KB) - added by viralsampat 21 months ago.
After resolved issue Back-end:
after-change-media-and-text-front-end.png (1022.0 KB) - added by viralsampat 21 months ago.
After resolved issue front-end:

Change History (10)

#1 @karmatosed
21 months ago

  • Keywords needs-testing added

I am going to note we need some testing for this. It would also be great to not just have video but have some screenshots to increase understanding. Thanks for reporting.

#2 @viralsampat
21 months ago

Hello @karmatosed

Thank you so much for the update.

Here, I have attached screenshot before/after change for reference.

Thanks,

@viralsampat
21 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
21 months ago

After resolved issue Back-end:

@viralsampat
21 months ago

After resolved issue front-end:

#3 @poena
21 months ago

On the front, the media & text block has different padding applied depending on the browser width

@media (min-width: 700px) {
    .wp-block-media-text .wp-block-media-text__content {
        padding: 4rem;
    }
}

.wp-block-media-text .wp-block-media-text__content {
    padding: 3rem 2rem;
}

While in the editor, only the block's default padding is applied:

    padding: 0 8%;

#4 @sajib1223
4 weeks ago

  • Keywords needs-testing removed

Patch Testing Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61433/61433.patch

Environment

  • WordPress: 7.0-alpha-61215-src
  • PHP: 8.2.29
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
  • Browser: Firefox 147.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty 3.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps take

  1. Applied patch.
  2. Created new post, Inserted "Media & Text" block, set media width to 85, added text to the paragraph inside the "Media & Text" block.
  3. Checked frontend, the text have a 8% padding.
  4. ✅ Issue partially resolved with patch.

Expected outcome

  • 8% vertical padding on Desktop.
  • Appropriate padding on mobile/tablet.
  • Issue partially resolved with patch.

Screenshot/Screencast

Desktop view after patch:

https://files.catbox.moe/ux913w.png

#5 @sajib1223
4 weeks ago

  • Keywords changes-requested added

The desktop view looks correct, mobile/tablet screen need changes.

Mobile view after patch:

https://files.catbox.moe/x855cz.png

Mobile view before patch:

https://files.catbox.moe/nb0joy.png

Note: See TracTickets for help on using tickets.