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

On 1/27/15, 11:00 AM, "Zack Weinberg" <> wrote:
>On Tue, Jan 27, 2015 at 1:19 PM, Tab Atkins Jr. <> 
>> On Tue, Jan 27, 2015 at 12:04 AM, Florian Rivoal <> 
>>>> On 26 Jan 2015, at 23:55, Alan Stearns <> wrote:
>>>> [...]
>>>> the deviation from the average
>>>> [...]
>>> Is this intentionally left vague, opening differences in terms of 
>>>quality of implementation?
>> That's not vague.  Deviation is a numerical value that you can compare
>> across lines.  It's just linear difference.
>>> I would clarify 'deviation' into 'standard deviation'. Compared to the 
>>>mean absolute deviation, the std dev is preferable, as it punishes 
>>>extreme values more. For example, on a four line block, if you have 
>>>between each line being 1 character off the average, or 2 lines being 
>>>exactly at the average and 2 lines being off by 2 characters, the 
>>>standard deviation would prefer the first situation, while the mean 
>>>absolute deviation would be indifferent.
>> I agree that minimizing the squared deviation is better.  It's almost
>> always better for these kinds of "get close to the average" things.
>> ~TJ
>I am concerned that this is getting to the level of detail where we
>might end up (possibly implicitly) requiring the use of a specific
>algorithm.  I don't think that would be appropriate here.

I don’t think that changing the method of evaluation from 'deviation' to 
'standard deviation' gets us too close to specifying an algorithm (which I 
would definitely resist). I’ve made that change, noted that balancing 
comes before justification adjustments, and added a clause that balancing 
occurs *only if* it’s possible to get better balance than normal line 

There will be some basic, testable cases where all reasonable attempts at 
balancing will succeed. But line-breaking algorithms differ and it’s easy 
to assemble content into difficult cases for balancing. So I assume there 
will be middle-difficulty cases where one browser balances better than 
another, and tough cases where one browser might find a way to balance 
where others fail.



Received on Tuesday, 27 January 2015 19:33:00 UTC