# rendering-content-visibility

The rendering-content-visibility rule applies content-visibility: auto to long lists so off-screen items can wait before rendering. It fits message feeds and other scrollable collections.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 1064 repo stars
- Author: jarrodwatts
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/jarrodwatts/claude-code-config/tree/HEAD/skills/vercel-react-best-practices/rules/rendering-content-visibility.md
- Updated: 2026-01-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/rendering-content-visibility

## What it does

The rule describes a CSS technique for long lists: set `content-visibility: auto` on list items and provide a placeholder size with `contain-intrinsic-size`. The browser can defer layout and painting for items outside the visible area.

Its example uses messages inside a scrollable container. Each item gets an estimated height of `80px`; if actual items differ substantially, that placeholder may need adjustment to match the list’s layout. For Claude Code, place the rule file at `.claude/rules/rendering-content-visibility.md`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/rendering-content-visibility.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/rendering-content-visibility.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/rendering-content-visibility.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/rendering-content-visibility.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/rendering-content-visibility.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/jarrodwatts/claude-code-config/tree/HEAD/skills/vercel-react-best-practices/rules/rendering-content-visibility.md

## When to use it
- defer rendering for items outside a long list’s viewport
- apply `content-visibility: auto` to messages in a scrollable feed
- set a placeholder size for items that have not been rendered

## Example prompts
- Apply the rule to this long message feed and show the CSS changes.
- Update the scrollable list so off-screen items can be rendered later.
- Check how to size placeholders for list items using `content-visibility: auto`.

## Similar
- [rendering-animate-svg-wrapper](https://affpapa.org/en/nevibecode/rules/rendering-animate-svg-wrapper.md) — rule · ★ 7191 repo stars
- [Rendex: Rendering API for Images, PDFs & Content Extraction](https://affpapa.org/en/nevibecode/mcp/rendex-rendering-api-for-images-pdfs-content-extraction.md) — MCP server · ★ 6 repo stars
- [pixijs-rendering](https://affpapa.org/en/nevibecode/skills/pixijs-rendering.md) — skill · 10800 installs
- [rendering-text-in-text-component](https://affpapa.org/en/nevibecode/rules/rendering-text-in-text-component.md) — rule · ★ 88 repo stars
- [rendering-no-falsy-and](https://affpapa.org/en/nevibecode/rules/rendering-no-falsy-and.md) — rule · ★ 88 repo stars
- [blender-rendering](https://affpapa.org/en/nevibecode/skills/blender-rendering.md) — skill · 2400 installs

From the same set: [jarrodwatts/claude-code-config](https://affpapa.org/en/nevibecode/by/jarrodwatts/claude-code-config.md) — 20 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
