Bug 16322 - same-sign flexibility in flexing algorithm
Summary: same-sign flexibility in flexing algorithm
Alias: None
Product: CSS
Classification: Unclassified
Component: Flexbox (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Alex Mogilevsky
QA Contact: public-css-bugzilla
URL: http://dev.w3.org/csswg/css3-flexbox/
Depends on:
Reported: 2012-03-12 08:19 UTC by Alex Mogilevsky
Modified: 2012-04-17 17:17 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alex Mogilevsky 2012-03-12 08:19:04 UTC
Current flexing algorithm choses to use either positive or negative flexibility for all items, which helps to ensure it will finish with any combination of flexibility and min/max sizes. This approach doesn't allow to optimize layout by shrinking a large item that is far from both its min and its max sizes, and growing a small item that is close to its preferred size. It may be possible to get a better result by calculating penalties based on actual size change, flexibility settings and where there calculated size is relative to min/max/preferred sizes.

Example to consider:

    <div style="flex:1 1 auto">long description of something important that is about to happen</div>
    <button style="flex:1 1 auto">I agree</button>