Skip to content

Add layout flow to text content in media and text block#70282

Closed
Rishit30G wants to merge 1 commit intoWordPress:trunkfrom
Rishit30G:fix/media-and-text-alignment
Closed

Add layout flow to text content in media and text block#70282
Rishit30G wants to merge 1 commit intoWordPress:trunkfrom
Rishit30G:fix/media-and-text-alignment

Conversation

@Rishit30G
Copy link
Contributor

What?

Closes: #70264

Why?

This PR is necessary to fix the text content layout issue in the media and text block

How?

Added the following classes to the text content part is-layout-flow and wp-block-media-text__content-is-layout-flow.

Testing Instructions

  • Add a Media Text block
  • Add some content
  • Notice now there is no more extra padding on top or bottom when vertically aligning the content

Screenshots or screencast

Before After
image image

@Rishit30G
Copy link
Contributor Author

Rishit30G commented Jun 1, 2025

Note

I was able to fix this issue for the editor, but I'm curious to know how we can fix this for the frontend, I tried working with save.js but didn't get the expected results

cc: @t-hamano

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Media & Text Affects the Media & Text Block labels Jun 2, 2025
@t-hamano
Copy link
Contributor

t-hamano commented Jun 2, 2025

@Rishit30G Thanks for the PR!

Adding the is-layout-flow class to the inner blocks directly isn't the right approach. I think this needs to be resolved via blockGap support.

Furthermore, this PR would conflict with #67208, which means we need to decide where blockGap support should be applied first.

Let me close this PR for now.

@t-hamano t-hamano closed this Jun 2, 2025
@Rishit30G
Copy link
Contributor Author

Makes sense @t-hamano, thanks for the review and suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Media & Text Affects the Media & Text Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Media & Text: text content should use layout flow spacing

2 participants