Comment

Comment by krtab

Cool use of tech!

> I ended up writing a small JavaScript function to maximize font size: it makes the text invisible (via CSS visibility: hidden), tries displaying the text at a very large size, and then tries successively smaller font sizes until it finds a size that lets all the text fit. It then makes the text visible again.

That would be a good application for dichotomic search if performance was ever a problem (I doubt it though).

More generally, having elements on a grid of different sizes should hopefully be much more easy once CSS masonry grid is available.

parent krtab 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton