Make WordPress Core

Opened 6 months ago

Closed 3 months ago

Last modified 2 months ago

#64326 closed enhancement (fixed)

Block Supports: Add typography text indent support

Reported by: aaronrobertshaw's profile aaronrobertshaw Owned by: ramonopoly's profile ramonopoly
Milestone: 7.0 Priority: normal
Severity: normal Version: 6.9
Component: Editor Keywords: gutenberg-merge has-patch add-to-field-guide needs-dev-note
Focuses: Cc:

Description

This ticket tracks the backport of PHP files for the following Gutenberg updates:

https://github.com/WordPress/gutenberg/pull/73114

These updates include the PHP and theme.json changes to add typography text indent block support.

Change History (9)

This ticket was mentioned in PR #10573 on WordPress/wordpress-develop by @aaronrobertshaw.


6 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/64326#ticket

### Description

Adds support for text-indent styles for Typography block supports.

https://github.com/WordPress/gutenberg/pull/73114

### Test Instructions

  1. Adopt typography.textIndent block support for a dynamic block via its block.json file
  2. Add a typography.textIndent value for the chosen test block in your theme.json file
  3. Create a post with the test block type
  4. Confirm the global style is applied to your test block

@ramonopoly commented on PR #10573:


3 months ago
#2

This works as described and matches the diff between https://github.com/WordPress/gutenberg/pull/74889

I'm just wondering whether we need to add test coverage for the new support and its expected output.

@andrewserong commented on PR #10573:


3 months ago
#3

+1 this is testing nicely for me, too, should be good once it's got a couple tests, I think.

@aaronrobertshaw commented on PR #10573:


3 months ago
#4

I've added some tests to cover both the block support and global styles angles. Let me know if they hit the spot.

@ramonopoly commented on PR #10573:


3 months ago
#5

I've added some tests to cover both the block support and global styles angles. Let me know if they hit the spot.

LGTM. I'll rebase quickly to fix conflicts

#6 @ramonopoly
3 months ago

  • Owner set to ramonopoly
  • Resolution set to fixed
  • Status changed from new to closed

In 61632:

Block Supports: Add text indent to typography supports

This commit adds CSS text-indent support for paragraph blocks with traditional typography conventions - subsequent paragraphs get first-line indented in LTR languages, with an option to indent all paragraphs (default for RTL languages).

Text indentation is a fundamental typography feature. Traditional print typography conventions dictate that only subsequent paragraphs (not the first) should have their first line indented in LTR languages, while RTL languages typically indent all paragraphs. This feature enables proper typographic styling that matches publishing standards.

Props aaronrobertshaw, ramonopoly, andrewserong, wildworks, matveb, skorasaurus, greenshady, kjellr.

Fixes #64326.

#8 @audrasjb
2 months ago

  • Keywords add-to-field-guide needs-dev-note added

This is worth mentioning in the Field Guide.
Also adding needs-dev-note just in case we can mention it in a more general note.

#9 @aaronrobertshaw
2 months ago

A dev note has already been published for this:
https://make.wordpress.org/core/?p=121744

Note: See TracTickets for help on using tickets.