Skip to content

Comment on The future of text layout is not CSS

Comments

I kmow all of the css/js hacks and tricks but the information i need is the screen size in real mm.

Currently i put up a visibility:hidden position:absolute left:-9000px div with nobr, put the first line of text in it, then get the width of it with computed style, calculate the root font size to make it the line exactly the screen width. Then the div is removed and the rest of the content is allowed on the page.

This is the only thing that works.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.