Testing

CSS content-visibility: Browser Support, Values, Issues

content-visibility works in Chrome 85+, Edge 85+, Firefox 125+, Safari 18+, Opera 71+, and Samsung Internet 14+. Learn the values, performance, and issues.

Author

Prince Dewani

May 1, 2026

content-visibility is a W3C CSS Containment Module Level 2 property that lets browsers skip layout and paint work for off-screen content. It works in Chrome 85+, Edge 85+, Firefox 125+, Safari 18+, Opera 71+, and Samsung Internet 14+, while Internet Explorer never supported it and Firefox 109 to 124 kept it disabled by default.

This guide covers what content-visibility is, the browsers that support it, the accepted values, the performance benefits, the contain-intrinsic-size pairing, and the known issues.

What is content-visibility?

content-visibility is a CSS property defined in the W3C CSS Containment Module Level 2. It lets browsers skip layout, style, and paint work for elements that are off-screen, which speeds up initial page load on long pages. It accepts three keyword values: visible, hidden, and auto.

Which browsers does content-visibility support?

content-visibility now works across all three major browser engines. Chrome and Edge picked it up first, Safari joined when WebKit shipped support in Safari 18, and Firefox flipped the flag on by default in Firefox 125.

Loading browser compatibility data...

content-visibility compatibility in Chrome

Chrome supports content-visibility by default from Chrome 85 on Windows, macOS, Linux, ChromeOS, and Android. The visible, hidden, and auto values all ship in the same release, and the contentvisibilityautostatechange event also lands in Chrome 85. Chrome 4 to 84 did not support the property at all.

content-visibility compatibility in Edge

Microsoft Edge supports content-visibility by default from Edge 85 on Windows, macOS, and Linux. Chromium-based Edge inherits the property directly from the underlying Blink engine, so every Edge version from 85 onward matches Chrome on values and event support. Legacy EdgeHTML 12 to 18 did not support the property.

content-visibility compatibility in Firefox

Firefox supports content-visibility by default from Firefox 125 on Windows, macOS, Linux, and Android. Firefox 109 to 124 kept the property disabled by default behind the layout.css.content-visibility.enabled flag in about:config. Firefox 2 to 108 did not support content-visibility at all and ignored the declaration.

content-visibility compatibility in Safari

Safari supports content-visibility by default from Safari 18 on macOS Sequoia and Safari 18 on iOS 18 and iPadOS 18. Earlier WebKit versions did not parse the property and rendered every section eagerly. Pages that need the rendering skip on older iOS users should gate the rule with an @supports block.

content-visibility compatibility in Opera

Opera supports content-visibility by default from Opera 71 on desktop, which tracks the Chromium 85 release line. Opera Mobile 60 on Android also supports the property by default since it shares the same Blink engine. Opera Mini does not support content-visibility because the Presto-based proxy renderer skips most modern CSS containment.

content-visibility compatibility in Samsung Internet

Samsung Internet supports content-visibility by default from Samsung Internet 14 on Galaxy phones and tablets. The browser shares the underlying Chromium engine with Chrome on Android, so it matches Chrome 85 on values and event support. Samsung Internet 4 to 13 did not support the property and silently ignored the rule.

content-visibility compatibility in Android Browser

Chrome for Android supports content-visibility by default from Chrome 85 on Android 7 and later. The legacy stock Android Browser on Gingerbread through KitKat does not support content-visibility because that engine predates the CSS Containment Module. Modern Android WebView inherits the Chromium engine, so embedded apps pick up the property as the system WebView refreshes past version 85.

content-visibility compatibility in Internet Explorer

Internet Explorer 6 through 11 do not support content-visibility. The property landed long after Microsoft retired the Trident engine in favor of Edge. Users on Windows who need the rendering skip should switch to Microsoft Edge 85 or later, where Chromium-based Edge supports the property by default.

Note

Note: content-visibility behaves differently across Safari 18, Firefox 125, and older mobile WebViews. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What values does content-visibility accept?

content-visibility accepts three keyword values. Each one changes whether the browser lays out and paints the element, whether the element keeps its rendered state, and whether the element stays reachable to find-in-page and screen readers.

  • visible: The default value. The element renders normally, the browser lays it out and paints it whether it is on-screen or off-screen, and no containment is applied. Use visible to opt a single child out of a wrapper that sets content-visibility on the parent.
  • hidden: Skips rendering completely and removes the contents from the layout tree, similar to display: none for layout cost. Unlike display: none, the element stays in the DOM and the accessibility tree, and the browser keeps the rendered state cached for a quick re-display when you flip the value back to visible.
  • auto: Skips rendering only while the element is off-screen, and renders it as it nears the viewport. The element keeps layout, style, and paint containment, stays in the accessibility tree, and remains reachable to find-in-page, tab navigation, and anchor links. auto is the value almost every long page should use.

What are the performance benefits of content-visibility?

content-visibility: auto removes the cost of laying out and painting off-screen sections on the first frame. The web.dev case study reports rendering time on a long travel article dropping from 232 ms to 30 ms, roughly a 7x speed-up on initial render.

  • Faster first paint: The browser skips the layout, style, and paint phase for every section that is below the fold, so the first frame ships sooner. This shows up as a smaller Largest Contentful Paint and a smaller Total Blocking Time on long article pages.
  • Cheaper re-rendering: When the user scrolls to a section the browser renders only that section. Sections that have already scrolled past keep their cached layout under content-visibility: auto, so scrolling back is close to free.
  • Use the contentvisibilityautostatechange event: The element fires this event when it crosses the relevance threshold and the browser starts or stops rendering it. Hook it to lazy-mount expensive components, defer image decoding, or pause an embedded player without needing an IntersectionObserver.
  • Pairs cleanly with virtual scrollers: Long lists that already use windowing libraries can drop content-visibility: auto on each row to skip layout for rows the windowing layer still keeps in the DOM, which trims the work the engine does on resize and zoom.
// Feature-detect content-visibility before relying on it
if (CSS.supports('content-visibility', 'auto')) {
  // Apply content-visibility: auto to every long article section
  document.querySelectorAll('article > section').forEach((section) => {
    section.style.contentVisibility = 'auto';
    section.style.containIntrinsicSize = 'auto 600px';
  });
  console.log('content-visibility is on; offscreen sections will skip render work.');
} else {
  console.log('content-visibility is not supported in this browser; sections render eagerly.');
}
...

How do you use content-visibility with contain-intrinsic-size?

contain-intrinsic-size sets a placeholder size for an element that uses content-visibility: auto while the element is off-screen and not laid out. Without it the browser treats the box as zero-height and the scrollbar, scroll-into-view, and anchor links break.

  • Pair every content-visibility: auto rule with a size: Set contain-intrinsic-size on the same selector. The keyword auto in front of a length, like contain-intrinsic-size: auto 600px, tells the browser to use the placeholder size at first and remember the real rendered size after the section scrolls past.
  • Pick the size from the median rendered height: Measure a few real sections in the DOM inspector and use the median value. A placeholder that is too small produces a jumpy scrollbar; a placeholder that is too large pads the page with empty space at the bottom.
  • Use the auto length keyword for dynamic content: contain-intrinsic-size: auto X means the browser uses X until the section renders once, then locks the cached size for subsequent off-screen passes. This keeps the scroll position stable even when sections vary in height.
  • Skip contain-intrinsic-size when the parent already sets height: If the section uses an explicit height or the parent grid template fixes the row height, the browser already knows the layout cost and the placeholder is not needed.

What are the known issues with content-visibility?

content-visibility ships in every modern engine, but the way each browser handles anchor links, find-in-page, sticky headers, and printing inside an auto section still trips up production sites.

  • Anchor links break without contain-intrinsic-size: A page with content-visibility: auto on every section but no placeholder size collapses every off-screen section to zero height. Clicking an in-page anchor lands at the wrong scroll offset, since the browser only knows the real height after the section renders. Always set contain-intrinsic-size to keep anchor jumps accurate.
  • Sticky positioning stops at the auto section: A position: sticky child stops sticking once any ancestor sets content-visibility: auto, because the auto rule applies layout containment and the sticky element is now positioned relative to that container. Move the sticky header above the content-visibility ancestor to keep the sticky behavior.
  • Print output skips off-screen sections in older builds: Chrome 85 to 88 printed pages that used content-visibility: auto with the off-screen sections collapsed. Chrome 89 forces a full render before print so every section appears in the PDF; teams stuck on older Chromium-based clients should set content-visibility: visible inside an @media print block.
  • Firefox 109 to 124 needs an opt-in flag: Even though Firefox 109 shipped the implementation, the user has to flip layout.css.content-visibility.enabled in about:config to turn it on. Pages that depend on the rendering skip should treat Firefox below 125 as unsupported and rely on the @supports gate instead.
  • find-in-page works only with auto, not hidden: content-visibility: auto keeps the section reachable to Ctrl+F and to screen readers because the engine renders the section before the find result lands. content-visibility: hidden removes the section from search and from the accessibility paint, so do not use hidden on landmark text the user might search for.

In my experience, the failure that bites teams the most is the missing contain-intrinsic-size, where a page that ships content-visibility: auto without the placeholder size loads fast on the first paint but then thrashes the scrollbar, breaks deep links from search engines, and makes Cmd+F land on the wrong section. Setting contain-intrinsic-size: auto 600px on the same selector fixes the whole class of bugs in one line.

...

Citations

All content-visibility version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests