Skip to content

Conversation

@dhananjaykuber
Copy link
Contributor

@dhananjaykuber dhananjaykuber commented Jul 23, 2025

Closes #55225

What?

This PR implements a new Text Indent control component and integrates it into the Paragraph block's typographic settings.

Why?

Lacked a direct way to control text indentation.

How?

A new control component has been developed to manage text indentation values.

Testing Instructions

  • Add a Paragraph Block and add text in that
  • In Typograph settings of block select Text Indent
  • Add Text Indent value
  • See the changes on editor
  • Save post and see changes on frontend

Screenshots or screencast

Screenshot 2025-07-23 at 1 53 52 PM Screenshot 2025-07-23 at 1 57 50 PM Screenshot 2025-07-23 at 1 58 04 PM

@github-actions
Copy link

github-actions bot commented Jul 23, 2025

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: dhananjaykuber <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: simom <[email protected]>

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

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

Ideally, we should discuss whether this style should be added as block support. An ad-hoc approach would make it harder to migrate to block support in the future. That is, it should work like this.

block.json:

{
	"apiVersion": 3,
	"name": "core/paragraph",
	"title": "Paragraph",
	"supports": {
		"typography": {
			"textIndent": true
		}
	}
}

Moreover, we should probably support this in the global styles as well, so in theme.json we'd have something like this:

{
	"$schema": "../../schemas/json/theme.json",
	"version": 3,
	"settings": {
		"blocks": {
			"core/paragraph": {
				"typography": {
					"textIndent": true
				}
			}
		}
	},
	"styles": {
		"blocks": {
			"core/paragraph": {
				"typography": {
					"textIndent": "20px"
				}
			}
		}
	}
}

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Paragraph Affects the Paragraph Block [Package] Block editor /packages/block-editor labels Jul 23, 2025
@t-hamano
Copy link
Contributor

See: #55225 (comment)

@t-hamano
Copy link
Contributor

I think this feature would be best worked into the theme.json layer first, without exposing the UI. Let's close this PR in favor of #59496.

cc @MaggieCabrera

@t-hamano t-hamano closed this Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Paragraph Affects the Paragraph Block [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text indent control for typographic elements

2 participants