content‑visibility: auto Tester - Online Render Deferral
Apply content‑visibility: auto to off‑screen sections and see the rendering cost drop. Demos for infinite scroll optimization.
UD5 Toolkit
Measure and compare rendering performance with & without CSS content-visibility: auto
content-visibility
FPS: --
content-visibility: auto
FPS: --
content-visibility: auto is a CSS property that tells the browser to skip rendering of elements that are off-screen (outside the viewport). The browser automatically determines when an element is near the viewport and renders it just in time. This significantly reduces initial page layout and paint costs, especially for pages with large amounts of content. It combines contain: layout style paint with automatic visibility detection — the element still occupies space in the DOM and contributes to scroll dimensions, but its painting work is deferred until needed.
contain-intrinsic-size to prevent scrollbar jank when content hasn't been measured yet.
contain-intrinsic-size, scrollbar may jump as elements are measured. (3) find-in-page (Ctrl+F) may miss content in unrendered areas. (4) Accessibility tools that scan the DOM may not "see" skipped content. (5) Not supported in Firefox (as of 2024). Always test with your specific use case and provide a fallback.
content-visibility. The content still exists in the HTML, so indexing should work normally. However, if you're using it on critical above-the-fold content, ensure that content renders before crawler timeout. For maximum safety, avoid applying content-visibility: auto to your main content area's first visible portion — use it only below the fold.
content-visibility: auto. Safari added support in version 17.4+ (March 2024). Firefox does not yet support it (track Bugzilla #1798480). Use @supports (content-visibility: auto) for progressive enhancement — browsers that don't support it will simply render all content normally.
performance.now() with double requestAnimationFrame to capture full paint completion. (2) Scroll FPS — calculated by tracking requestAnimationFrame timestamps during synchronized auto-scrolling across both panels. (3) Long Tasks — monitored via PerformanceObserver for tasks exceeding 50ms. All measurements run on identical content in parallel containers for a fair, real-time comparison.
contain-intrinsic-size provides a placeholder size for elements before they're rendered. Without it, the browser must estimate dimensions, which can cause scrollbar instability as elements load in. Always set contain-intrinsic-size when you know the approximate size of your off-screen content — e.g., contain-intrinsic-size: auto 300px; for 300px-tall cards. Use the auto keyword to let the browser remember the last rendered size, providing the smoothest experience.
contain-intrinsic-size. Many sites report LCP improvements of 20–50% after applying content-visibility: auto to below-the-fold sections.
Apply content‑visibility: auto to off‑screen sections and see the rendering cost drop. Demos for infinite scroll optimization.
Render 1000 styled elements using inline styles vs. CSS classes and compare time. Understand CSS‑in‑JS trade‑offs.
Add many complex CSS styles and measure frames per second. Isolate expensive properties. Practical performance lab.
Create CSS mask‑image effects with custom shapes, gradients, and SVGs. Visually see the mask applied to an image. Copy the CSS.
Select a caching strategy and see a flow diagram of how requests are handled. Learn PWA patterns.
Write or paste HTML, CSS, and JavaScript and instantly see the rendered output in a sandboxed iframe. A handy frontend prototyping tool.
Run a CPU‑heavy calculation (e.g., prime numbers) in a Web Worker and see the UI stay responsive. Code snippet provided.
Generate a complete <head> section with meta charset, viewport, SEO, favicon, and social tags. Customize and copy.
Paste GeoJSON and instantly see it drawn on a draggable map. Supports points, lines, and polygons. Local fetch of tiles.
See the View Transitions API in action. Cross‑fade and morph between two states. Copy the JavaScript starter code.
See your current page load broken down into DNS, TLS, request, and DOM phases. Understand where time is spent.
See your current page load broken down into DNS, TLS, request, and DOM phases. Understand where time is spent.
Use CSS masks and fixed backgrounds to create a unique parallax reveal effect. Copy the code. No JavaScript.
Render the classic Stanford Bunny with a basic WebGPU pipeline. Rotate and zoom. Check if your browser supports WebGPU.
Customize falling snow particles with pure CSS or canvas. Adjust speed, size, and wind. Copy the code for your website.
Create an animation that advances with scroll using animation‑timeline: scroll(). See the visual timeline editor. Modern CSS.
Generate an <img> tag with the loading='lazy' attribute and optional low‑quality placeholder. Improve Core Web Vitals. Copy the snippet.
Visually create the glassmorphism effect: background blur, transparency, and border. Copy the complete CSS. Modern UI design.
Create a pure CSS scroll progress indicator using animation‑timeline: scroll(). No JavaScript. Copy the complete code.
Write a paint worklet in JavaScript and see it used as a CSS background instantly. Experiment with Houdini. Local.
See how overflow: visible, hidden, scroll, and auto behave with real content. Clone to test with your text.
Display used/total/limit JS heap size using performance.memory. Take snapshots and see growth. Simple memory leak detection.
Register and apply a custom paint worklet to draw a background pattern dynamically. Write the paint function in the browser.
Write Markdown and see the formatted HTML preview in real time. Syntax highlighting and GitHub-flavored Markdown support. No upload, fully local.
Adjust root, margin, and threshold. See a live log of intersection events as you scroll. Debug lazy loading.
Create a custom element with named slots and see content projection in action. Learn Web Components basics.
Limit browser gestures on an element: pan‑x, pinch‑zoom, manipulation. Draw on a canvas to test. Mobile dev helper.
Type raw HTML and see the escaped version, then see how it renders when unescaped. Understand encoding better.
Draw shapes and experiment with globalCompositeOperation. See Porter‑Duff operators in action. Great for game devs.
Paste HTML/CSS and render it to a canvas image. Download as PNG. For creating dynamic social share images.