Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wonder if the nascent CSS Layout API enables a proper solution to this. A quick skim of the spec seems to indicate that it could run the author’s algorithm in a single layout pass and it does reveal the browser’s chosen line break points, but it doesn’t give word by word metrics. But, maybe you could use custom elements and JS-inserted children to get word by word metrics with performance still good since there’s still only one pass.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: