Skip to content

Conversation

@Mustafabharmal
Copy link
Contributor

What?

Adds overflow-wrap: break-word to the front-end styles of Paragraph, Post Content, and Post Excerpt blocks.

Why?

Closes #52871

Long unbroken text (text without spaces or line breaks) currently overflows on the front-end, overlapping other content. This is especially visible in multi-column layouts like query blocks.

In the editor, text wraps correctly because .block-editor-block-list__block already has overflow-wrap: break-word applied. However, this CSS was missing from the front-end styles for these blocks.

How?

Added overflow-wrap: break-word to:

  • p.wp-block-paragraph in paragraph/style.scss
  • .wp-block-post-content in post-content/style.scss
  • .wp-block-post-excerpt__excerpt in post-excerpt/style.scss

This follows the same pattern already used in other blocks (quote, pullquote, embed, columns, code, etc.).

Testing Instructions

  1. Create a new post with a very long line of text without any spaces (e.g., aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...)
  2. Go to the Site Editor and view the home template
  3. Confirm the post displays in a query block with 3 columns
  4. View the home page on the front-end
  5. The long text should now wrap correctly instead of overflowing
  6. Test with both the post excerpt and post content blocks

Screenshots or screencast

Before:

Text appears as one long line

Screen.Recording.2026-01-29.at.3.54.24.PM.mov

After:

Text wraps properly across multiple lines

Screen.Recording.2026-01-29.at.3.56.19.PM.mov

@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions github-actions bot added the [Package] Block library /packages/block-library label Jan 29, 2026
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Mustafabharmal <[email protected]>
Co-authored-by: ghorivipul97 <[email protected]>
Co-authored-by: carolinan <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

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

Labels

[Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text content is missing break-word on the front

1 participant