Hacker News new | ask | show | jobs
by Bockit 4349 days ago
> we can make the number of columns depend on the available space, so that a narrow screen will have one column, a wider screen will have two columns, etc. This is all it takes to specify that the optimal line length is 15em and for the number of columns to be calculated accordingly

It looks like the columns property can take a size value, which the browser will use to work out how many columns it can fit.

1 comments

Wouldn't this leave a bunch of white space on one side if the screen width is not an exact multiple of that size? That doesn't seem like a good solution to me.
The browser could distribute the white space between columns to avoid this.
Yes, that's how the spec is written: the style sheet specifies an optimal line length, but it will be adjusted somewhat to fill the whitespace.