FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Pretext Does What CSS Can't — Measuring Text Before the DOM Even Exists
NewsWeb Development

Pretext Does What CSS Can't — Measuring Text Before the DOM Even Exists

via HackernoonTypesetting6h ago

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.

Continue reading on Hackernoon

Opens in a new tab

Read Full Article
0 views

Related Articles

Dependency Injection in iOS
News

Dependency Injection in iOS

Medium Programming • 25m ago

News

zxing Decoder Online|2026

Medium Programming • 1h ago

Don't ignore your desktop PC's empty M.2 slots - they're more useful than you think
News

Don't ignore your desktop PC's empty M.2 slots - they're more useful than you think

ZDNet • 1h ago

My favorite color e-reader is still $80 off, but hurry if you want to save
News

My favorite color e-reader is still $80 off, but hurry if you want to save

ZDNet • 4h ago

Cosine Similarity vs Dot Product in Attention Mechanisms
News

Cosine Similarity vs Dot Product in Attention Mechanisms

Dev.to • 4h ago

Discover More Articles