v149 · CSS

Card Grid Rhythm

In a card grid, padding-top on each card is supposed to give consistent top spacing. But heading text carries invisible leading above the cap height — so the visual gap above the text is always larger than the padding value says. text-box: trim-both cap alphabetic removes that invisible space, making the padding you write match the gap the user sees.

Without text-box — yellow region includes invisible leading above cap height

Without text-box

The Title

Yellow background starts at the top of the em square — above the cap height. The visual content (letters) starts lower.

With text-box

The Title

Yellow background starts exactly at the cap height. text-box: trim-both cap alphabetic

CSS · v149

Scroll State Queries

Style sticky, snapped, and scrollable elements without a single scroll listener. The browser exposes its own state tracking.

3 minCSS

JavaScript · v149

Uint8Array Base64 & Hex in ECMAScript 2026

Six new methods eliminate the atob/btoa dance. Native binary-to-text encoding, finally.

4 minJS

CSS · v149

Gap Decorations

Draw lines inside grid and flexbox gaps using column-rule and row-rule — no extra elements needed.

2 minCSS

CSS · v149

CSS text-box: Trim the Invisible Leading

The longest-awaited typographic primitive. Cap height and alphabetic baseline are now addressable from CSS.

5 minCSS

CSS · v149

image-rendering: crisp-edges

Pixel art, scaled up without blur. The nearest-neighbour algorithm preserves every edge.

2 minCSS

Performance · v149

BFCache and WebSockets

Pages with live WebSocket connections can now enter back/forward cache. The browser closes the socket on entry.

3 minWeb
/* On a card's heading: trim invisible leading above cap-height */
.card-heading {
  text-box: trim-both cap alphabetic;
}

/* Without this, the "cap height" of the first line is offset
   downward by about (line-height - 1em) / 2 worth of space.
   With it, the heading's content box starts exactly at the cap. */

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗