Skip to main content
Module 15 · Lesson 3 of 459/60 in the course~19 min
Module lessons (3/4)

content-visibility: auto, :where() & :has() Orchestration

Lesson preview5 hands-on exercises readyModern HTML & CSS · CSS Architecture at Scale: @scope, Scroll Snap & Systems

Accelerate initial render on long feeds with content-visibility and coordinate interactive parent states cleanly at zero specificity.

What you'll learn in this lesson

  • Speed up long lists and article feeds by skipping off-screen rendering work with content-visibility: auto and contain-intrinsic-size.
  • Compose state-aware card grids cleanly using :has(input:checked) with zero JavaScript state toggling.
  • Keep responsive container rules lightweight via :where() zero-specificity selectors inside @container.

Overview

Imagine rendering a 200-card documentation archive or message feed. Even cards 3,000px below the fold force layout calculation and paint prep on first load—unless you hint to the browser to skip off-screen layout until scroll nears them:

Pair zero-specificity :where() inside @container with :has(:checked) so utility modifiers win effortlessly without selector weight inflation:

Sections covered in this lesson

  1. 1Skipping Offscreen Render Work With content-visibility
  2. 2Orchestrating Card State at Low Specificity
Pro Lesson · CSS Architecture at Scale: @scope, Scroll Snap & Systems

Unlock "content-visibility: auto, :where() & :has() Orchestration" and the full Modern HTML & CSS curriculum

Accelerate initial render on long feeds with content-visibility and coordinate interactive parent states cleanly at zero specificity.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Modern HTML & CSS plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.