Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Block Splitting/Appending: consider retaining styles from previous block | GoodFirstPicks

Block Splitting/Appending: consider retaining styles from previous block

WordPress/gutenberg 4 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeWordPressJavaScriptReact

Why this is a good first issue

The issue involves modifying block behavior to retain styles, which requires understanding Gutenberg's block handling logic.

AI Summary

The issue describes a scenario where styles (alignment, font size) are not retained when hitting enter at the end of a styled paragraph. The task involves modifying the block splitting logic to retain these styles, similar to how it works when splitting in the middle of content. The main challenge is ensuring consistency and handling edge cases.

Issue Description

Description

(Not sure if this can be considered a bug or enhancement.)

When hitting enter at the end of a paragraph that has particular styles or alignment applied, those styles are not applied to the next inserted paragraph. This can make editing a little slow, the user is forced to reapply styles to new blocks, and it's especially noticable when adding to existing content, like that from a pattern:

https://github.com/user-attachments/assets/00bb33e1-ea7b-48f7-a48d-7cd9fa7e00a6

Should the existing styles be retained? This is something that does already happen when a paragraph is split in the middle of content, but perhaps there are additional considerations when a paragraph is split at the end.

Step-by-step reproduction instructions

  1. Add a paragraph
  2. Align it centrally, change the font size
  3. Type some text
  4. Hit enter
  5. Observe that the next paragraph doesn't have those styles.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

GitHub Labels

[Type] BugNeeds Design Feedback[Feature] Writing Flow

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • behavioral consistency
  • edge cases
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno