The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
WordPress 7.0 introduces a new textIndentblockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. support for typography, allowing blocks to opt in to text-indentCSSCSSCascading Style Sheets. support. The Paragraph block is the first coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. block to adopt this support.
Background
Text indentation is a standard typographic convention, particularly in long-form publishing. It has been one of the most-requested typography features for WordPress blocks since 2021 (#37462).
With this release, WordPress now supports it natively through a new block support. No custom CSS required.
The textIndent Block Support
Any block can now declare support for textIndent in its block.json:
When a block declares this support, the block editor will show a Line Indent control in the Typography panel of the block sidebarSidebarA sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme., and the block’s style.typography.textIndent attribute will be serialised as a text-indent CSS property.
This follows the same pattern as other typography block supports such as letterSpacing, textDecoration, and textTransform.
Paragraph Block: Selector Behaviour and the textIndent Setting
The textIndent support has a unique consideration specific to the core Paragraph block: in traditional typographic conventions of English and some other left-to-right (LTR) languages, only subsequent paragraphs (those that follow another paragraph) are typically indented, while the very first paragraph in a sequence is not. In some right-to-left (RTL) languages and publishing traditions, such as Arabic and Hebrew, however, it is common to indent all paragraphs.
To accommodate both conventions, a typography.textIndent setting controls which CSS selector is used when generating the text-indent rule. This setting is distinct from the style value (the actual indent amount) and applies at the Global Styles level.
Setting value
Selector used
Behaviour
"subsequent" (default)
.wp-block-paragraph + .wp-block-paragraph
Only paragraphs immediately following another paragraph are indented
"all"
.wp-block-paragraph
All paragraphs are indented
Note: This selector behaviour is specific to core/paragraph. Third-party blocks that opt in to textIndent support will have text-indent applied using their own block selector, but the subsequent/all switching logic is not currently available to them.
In Global Styles, an “Indent all paragraphs” toggle lets authors switch between the two modes interactively.
Configuring via theme.json
Themes can enable and configure Line Indent support through theme.json.
Enable the control with default (subsequent) behaviour:
This is a new opt-in feature. No existing block behaviour changes unless a block explicitly declares "textIndent": true in its supports.typography definition. There are no breaking changes to existing APIs.
Further Reading
GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged by the repository owner. https://github.com/ issue: #37462