My dear front-end developers (and anyone who’s interested in the...

I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at least in concept):
Fast, accurate and comprehensive userland text measurement algorithm in pure TypeScript, usable for laying out entire web pages without CSS, bypassing DOM measurements and reflow
With this solved, no longer do we have to choose between the flashiness of a GL landing page, vs the practicality of a blog article. Demos:
This was achieved through showing Claude Code and Codex the browsers ground truth, and have them measure & iterate against those at every significant container width, running over weeks
In the past, such measurement also had to be batched, which wrecked the programming model of having UI components boundaries in the first place. The best perf gains come from architectural shifts! Measurements are actively tracked in the repo
`npm`/`bun install @chenglou/pretext` and throw your AI into making cool demos for it!
chenglou.me/pretext/
somnai-dreams.github.io/pretext-demos/
Will keep adding more!
For immediate benefits, see
x.com/_chenglou/stat…