Skip to content
Performance & Accessibility

Content Visibility and Rendering Work: The Decisions That Matter

Using the CSS content-visibility property so the browser skips layout and painting for sections of a long page that are off screen until they are needed.

MediaScaleUp Editorial Team 2 min read 16 views
Content Visibility and Rendering Work: The Decisions That Matter

Why does it matter?

Long pages spend rendering time on content nobody has scrolled to yet, and content-visibility can reduce that work substantially with one CSS rule.

What are the numbers?

  • content-visibility: auto skips rendering off-screen content until it approaches the viewport
  • contain-intrinsic-size reserves estimated space so the scrollbar and layout stay stable
  • Accessibility skipped content remains available to find-in-page and assistive technology
  • Browser support supported in all major browsers since 2024

What should I do?

  1. Apply it to long, independent sections such as article comments or product lists
  2. Set contain-intrinsic-size to a realistic estimate
  3. Measure rendering time before and after
  4. Check that scrolling and anchors still behave correctly
  5. Test with screen readers
What to do and what to avoid with content visibility and rendering work, side by side
Good practice against the usual mistakes, from the sources listed below.

What should I avoid?

Avoid:

  • Applying it to above-the-fold content
  • Missing size estimates that make the page jump
  • Using it on tiny sections where the savings are negligible
  • Assuming it fixes JavaScript performance

When should I get help?

Short answer Bring in help when very long pages render slowly, or when rendering work dominates performance profiles.

Where this comes from

  • web.dev — content-visibility: the new CSS property that boosts your rendering performance
  • MDN Web Docs — content-visibility

The figures and practices above come from the sources listed.

Working on something like this?

We take on Performance & Accessibility work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Performance & Accessibility