zx web
web-platform22 min read

Modern HTML & CSS Features Powering the Next Generation of Resumable UI Frameworks

This article explores the new wave of browser-native features introduced between 2023–2025. These capabilities fundamentally change how UI frameworks can be built: enabling resumability, zero-JS controls, native state handling, accessible components, and server-rendered shadow DOM without hydration. This is the first comprehensive map of modern CSS and HTML features intended specifically for framework authors, design system teams, and engineers building next-generation UI kits.

By Engineering Architecture Team

Summary

Over the last two years, browsers have gained an unprecedented set of native capabilities: CSS conditions, @scope, anchor positioning, declarative shadow DOM, customizable select controls, the popover API, and more. These features dramatically reduce the need for JavaScript-driven UI, unlock server-rendered component trees without hydration, and provide primitives that previously required full frameworks. For teams building resumable architectures or buildless UI frameworks, these native features shift fundamental assumptions: many “framework responsibilities” now belong to the browser itself.

A New Baseline: What Modern HTML & CSS Now Provide

CSS @when / @else Conditions

Conditional logic inside CSS without media queries or JS

  • State-driven styles
  • Declarative theming
  • Hydration-free UI logic
  • Conditional component modes

CSS @scope

True component-scoped styling without Shadow DOM

  • Avoid selector conflicts
  • Local override rules
  • Framework-style encapsulation

CSS Anchor Positioning

Attach UI elements to triggers without manual coordinates

  • Tooltips
  • Menus
  • Popovers
  • Zero-JS positioning

CSS :has() Parent Selector

Conditional styling based on child state

  • Form validation UI
  • Navigation highlights
  • Interactive lists

CSS Nesting

Native nested selectors

  • Cleaner tokens
  • Component-scoped structure
  • Sass-like ergonomics

CSS Cascade Layers

Explicit ordering of reset/theme/component layers

  • Stable design systems
  • Predictable overrides
  • Conflict-free theming

Layout & Interaction: The Features That Replace JavaScript

Popover API

Native popover lifecycle with escape handling, focus management, and animations

  • Dropdowns
  • Context menus
  • Command palettes
  • Accessible by default

Dialog Element (Modern)

Fully accessible modal behavior built into HTML

  • Trap focus
  • Backdrops
  • Inert page disabling
  • Server-friendly

Inert Attribute

Disable entire regions of the DOM without JS logic

  • Modal states
  • Side panels
  • Content locking

Customizable Select (Open UI)

Selectable UI with complete styling control

  • No fake selects
  • Accessible listboxes
  • Declarative popovers

Subgrid + Masonry (emerging)

Next-generation layout primitives

  • Dashboard layouts
  • Fluid grids
  • Component alignment

View Transitions

Browser-native DOM transitions

  • Route animations
  • UI state transitions
  • Declarative motion

Declarative Shadow DOM: The Breakthrough for SSR & Resumability

Declarative Shadow DOM (DSD) introduces server-rendered shadow roots directly in HTML. Combined with `