SMRTR ProgrammingApr 21, 2026LogRocket

What if you could lay out UI without CSS? Meet Pretext

SMRTR summary

CSS was designed for documents, not dynamic UIs, which is why chat bubbles overflow, virtualized lists miscalculate heights, and scrollbars lie. Pretext, a new 5KB TypeScript library by React core alumni Cheng Lou, solves this by measuring text dimensions before the DOM renders anything — using Canvas and Unicode-aware line-breaking — enabling pixel-perfect virtualization, shrinkwrap bubbles, and 60fps canvas readers.

SMRTR provides this summary for quick context. The original article belongs to LogRocket.

Read the original article
SMRTR Programming

Get the next batch of curated stories in your inbox.

This archive is built from SMRTR newsletter stories. Subscribe for hand-picked stories without the extra noise.

Related Stories

Browse Programming
ProgrammingAug 25, 2026

The End of Programming

AI rewrote Bun's entire JavaScript runtime—one million lines of code in eleven days—for ~$165,000, with minimal human involvement. As AI-generated code surges exponentially,...