Skip to content

Add text-stable utility for text-wrap: stable - #20519

Open
abdelrhmanahmed255 wants to merge 4 commits into
tailwindlabs:mainfrom
abdelrhmanahmed255:feat/text-wrap-stable
Open

abdelrhmanahmed255 wants to merge 4 commits into
tailwindlabs:mainfrom
abdelrhmanahmed255:feat/text-wrap-stable

Conversation

@abdelrhmanahmed255

Copy link
Copy Markdown

We currently support text-wrap, text-nowrap, text-balance, and text-pretty.

This PR adds the missing text-stable utility from the CSS Text 4 spec (text-wrap: stable;). This value is designed for contenteditable elements and text editors to prevent lines preceding the cursor from shifting and re-wrapping while typing.

Utility added

  • text-stable -> text-wrap: stable;

Changes

  • Added text-stable to utilities.ts alongside existing text-wrap utilities
  • Added test coverage in utilities.test.ts
  • Added changelog entry

@abdelrhmanahmed255
abdelrhmanahmed255 requested a review from a team as a code owner September 26, 2026 23:26
@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: bb6c1740-595a-4f7e-86df-6c853db06809

📥 Commits

Reviewing files that changed from the base of the PR and between 2da37ab and 655308c.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

The change adds the static text-stable utility, which emits text-wrap: stable. The test checks the generated CSS and confirms that -text-stable and text-stable/foo produce no output. The Unreleased changelog links the entry to pull request #20519.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 65530

The utility and its test match the intended CSS behavior. No actionable merge risk remains after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to 2da37

The change affects 2 systems.

Changed systems: packages/tailwindcss, CHANGELOG.md

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — packages/tailwindcss (library) was modified; 2 changed files map to changed impact.
  • observed — CHANGELOG.md (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in CHANGELOG.md: The Unreleased “Added” entries now include text-stable, described as applying text-wrap: stable for editable-content line wrapping.
  • observed — Modified behavior in packages/tailwindcss/src/utilities.test.ts: The text-wrap test adds text-stable to the utilities whose output is checked.
  • observed — Modified behavior in packages/tailwindcss/src/utilities.test.ts: The expected snapshot adds a .text-stable rule with text-wrap: stable.
  • observed — Modified behavior in packages/tailwindcss/src/utilities.test.ts: The no-output cases add -text-stable and text-stable/foo.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely states the main change: adding the text-stable utility for text-wrap: stable.
Description check ✅ Passed The description directly explains the new utility, its CSS mapping, test coverage, and changelog update.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Adds a new text-wrap utility class.

The PR appears safe to merge.

Reviews (2) · Last reviewed commit: "docs(changelog): link PR #20519 in chang..."

Comment thread CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant