[Bug 16856] consider using division for negative flexibility

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16856

--- Comment #1 from Alex Mogilevsky <alexmog@microsoft.com> 2012-05-08 01:52:33 UTC ---
correct formula for the desired result is this:

space-shortage = sum(flex-basis) - available-space
shrink-factor = space-shortage / sum(flex-basis * negative-flex))
main-size = flex-basis * (1 - shrink-factor * negative-flex))

(previous proposed formula immediately scales all items by their negative flex
and gets divizion by zero when negative-flex is zero)

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 8 May 2012 01:52:37 UTC