[css-text-4] text-wrap:balance take 2

Hey all,

I’ve taken the last round of suggestions and updated the definition of 
text-wrap:balance. The changes are meant to satisfy these requirements:

1. The number of lines should not change
2. Balancing should consider float widths
3. Balancing should only occur within a block with direct inline box 
children

The definition is now:

- - - -
balance
    Same as normal for inline-level elements. 
    For block-level elements that contain 
    line boxes as direct children, 
    line breaks are chosen to balance 
    the inline-size those line boxes consume. 
    This must not change the number of line boxes 
    the block would contain 
    if text-wrap were set to normal.

    For balancing purposes, 
    the inline-size to consider includes 
    any length taken up by floats 
    that shorten the line box. 
    Line boxes are balanced when 
    the deviation from the average inline-size consumed 
    is reduced over the block 
    (including lines that end in a forced break).

    The exact algorithm is UA-defined.

    UAs may treat this value as normal 
    if there are more than ten lines to balance.
- - - -


Please pile on with more improvements.

Thanks,

Alan

Received on Monday, 26 January 2015 22:56:10 UTC