Current
·
C2
·2026-03
Pretext Does What CSS Can't — Measuring Text Before the DOM Even Exists
Pretext is a new JS/TS library from Cheng Lou (React core, react-motion, Midjourney) that calculates multiline text height without DOM reflow. It splits work into a one-time prepare() pass via off-screen canvas, then a pure-arithmetic layout() hot path that runs in ~0.09ms. The result: accurate pre-render height prediction for virtualized lists, chat UIs, and canvas renderers — plus layout primitives CSS literally doesn't have, like finding the minimum width for a block of text at a fixed line count. Solid i18n, rigorous accuracy testing, 7k+ GitHub stars in days. Still early: no SSR, system-ui is broken on macOS, and the 500x benchmark is the author's own caveat.
Find Your Interest
- iOS Sandbox Escape Is Public, and Apple Hasn’t Confirmed a Fix
- Apple, Siri’yi Otonom Yapay Zeka Ajanına Dönüştürüyor
- New ways to drive smarter discovery, deeper engagement, and business growth on Google Play
- You can't ignore Google Zero anymore
- Podcast Technology (Brenda Salinas)
- GTA 6’nın Dünyası Sandığınızdan Daha Tuhaf
- ‘the material itself has agency’: aléa work grows chairs underground with fungi
- Developers Continue to Optimize iPhone Apps for the Duo
- Kotlin Toolchain 0.14: Agentic Development and iOS Publishing
- Verse Engine Founder Q&A For Press And Partners
Current
·
C2
·2026-03






