4 ms·
I would love to support this, but we don't right now due to performance reasons. Dirty laundry: Each paragraph is laid out and measured only once (at a specifi
by fortes 16y ago
I would love to support this, but we don't right now due to performance reasons.
Dirty laundry: Each paragraph is laid out and measured only once (at a specific column width), then the metrics are all cached. Layout is then performed by dumping paragraphs into each column and just clipping whatever overflows.
The advantage is that this process is very fast, even on a mobile device. Try resizing a window and notice how quick the re-layout is.
The downside is that certain layouts are not possible right now, such as the example you've shown.
As browsers get faster, we'd like to start doing our own line layout, which would let us do far more here (with a performance penalty, unfortunately).