Regions.js icon indicating copy to clipboard operation
Regions.js copied to clipboard

Some experience remarks (different issues)

Open fiee opened this issue 13 years ago • 3 comments

I tried to simulate a magazine layout using regions. While it works rather good natively in Chrome 16 (text breaking options aren’t yet implemented, though), it’s rather limited with your script:

It’s really slow on some browsers; runtime increases exponentially (or the like) per region. On an iPad, 5 regions needed about 3s, 7 regions 8s and 9 regions up to 40s! Firefox and Safari were also slow, but not that bad. Didn’t check IE. I didn’t yet check deep enough if there is potential to optimize the iterations.

There are some css formatting problems that seem to stem from splitting the text into the regions: e.g. a :first-letter dropped cap appears not only at the beginning of the paragraph, but again at the beginning of every region where the paragraph continues. e.g. in a big heading containing <h1>Some <em>emphasized</em> text</h1>, the em part alone moved to a new region if there wasn’t enough space in the first one, generating a text order of "some text emphasized"!

But all in all it’s fascinating to be able to test regions at all outside of Chrome! Thank you!

fiee avatar Jan 19 '12 14:01 fiee

Thanks for the feedback. But I can't work on it right now because of many exams. It has been a long time that I didn't opened this project so let me some weeks and I'll try to take this into consideration.

rricard avatar Jan 19 '12 14:01 rricard

Performance is the main problem of this script. I should write a new algorithm anyway to treat this but it's a tricky problem.

rricard avatar Jan 19 '12 14:01 rricard

Any chance of future support for the break properties?

3.3. Region flow break properties: ‘break-before’, ‘break-after’, ‘break-inside’

User agents laying out content in multiple regions must determine where content breaks occur. The problem of breaking content into fragments fitting in regions is similar to breaking content into pages or columns.

Each break ends layout in the current region and causes remaining pieces of content from the named flow to be visually formatted in the following region in the region chain, if there is one.

kristianmandrup avatar Aug 28 '12 09:08 kristianmandrup