Skip to content

Add content-visibility utilities - #20520

Open
abdelrhmanahmed255 wants to merge 5 commits into
tailwindlabs:mainfrom
abdelrhmanahmed255:feat/content-visibility-utilities
Open

abdelrhmanahmed255 wants to merge 5 commits into
tailwindlabs:mainfrom
abdelrhmanahmed255:feat/content-visibility-utilities

Conversation

@abdelrhmanahmed255

Copy link
Copy Markdown

content-visibility was recently added to the default transition properties list in v4.1.5, but there are no core utility classes to set the property itself.

This PR adds core utilities for content-visibility to make off-screen rendering optimizations easier without needing custom CSS.

Utilities added

  • content-visibility-auto -> content-visibility: auto;
  • content-visibility-hidden -> content-visibility: hidden;
  • content-visibility-visible -> content-visibility: visible;

Changes

  • Added static utilities in packages/tailwindcss/src/utilities.ts
  • Added content-visibility to property-order.ts after display
  • Added unit tests in utilities.test.ts
  • Added changelog entry

@abdelrhmanahmed255
abdelrhmanahmed255 requested a review from a team as a code owner September 26, 2026 23:31
@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: b9e9cd59-7bc9-426b-9909-74cb310061ae

📥 Commits

Reviewing files that changed from the base of the PR and between eec42a3 and fd3c481.

📒 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; 5 remain after this review.


Walkthrough

The change adds content-visibility-auto, content-visibility-hidden, and content-visibility-visible utilities. Each utility sets content-visibility to its corresponding value. The property ordering list includes content-visibility after display. Tests check the generated CSS and confirm that negative and /foo variants produce no output. The Unreleased changelog entry now links to pull request #20520.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to fd3c4

No identified issue prevents merging after normal checks.

Architecture Summary

Architecture risk: 🔵 Low · up to eec42

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; 3 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” list now records three content-visibility utilities: content-visibility-auto, content-visibility-hidden, and content-visibility-visible.
  • observed — Modified behavior in packages/tailwindcss/src/property-order.ts: Adds content-visibility to the property ordering list after display.
  • observed — Modified behavior in packages/tailwindcss/src/utilities.test.ts: Adds a test asserting CSS output for content-visibility-auto, content-visibility-hidden, and content-visibility-visible, and empty output for their negative and /foo variants.
  • observed — Modified behavior in packages/tailwindcss/src/utilities.ts: Registers three static utilities that set content-visibility to auto, hidden, or visible.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding content-visibility utilities.
Description check ✅ Passed The description directly explains the three utilities, property ordering update, tests, and changelog entry.
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 content-visibility CSS utility classes.

The PR appears safe to merge; no outstanding findings remain.

Reviews (2) · Last reviewed commit: "docs(changelog): link PR #20520 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