cbies...@chromium.org https://drafts.csswg.org/css-flexbox/#intrinsic-sizes The CSS Flexbox specification changed the algorithm for calculating a flexbox's intrinsic size (see below for the spec link). The new algorithm produces better results when there are flex items that actually flex, because it takes flex factors and flex-basis into account, whereas so far we just sum up the preferred sizes of each flex item. The new algorithm gives better results for a case like:<div style="display: inline-flexbox;"><div style="flex: 1;">XX</div> <div style="flex: 2">XX</div></div>This above example will not size the flexbox big enough to fully fit the first flex item!The separate motivation is to follow the current version of the spec for compatibility with other browsers, who also want to update.(note: per the spec, we should also use this algorithm to size a flexbox's height when there is no height specified, but I will implement that separately, with a new intent if desired)Firefox: Public support
Edge: Private support Safari: No public signals Web developers: No signalsHard to tell. On the one hand, other browsers are committed to implementing flexbox as specified. On the other hand, this does potentially affect shipped content. I believe inline/shrink-wrapped flexboxes to be rare, though.
The new algorithm gives better results for a case like:<div style="display: inline-flexbox;">
Compatibility Risk
Describe the degree of compatibility risk you believe this change posesHard to tell. On the one hand, other browsers are committed to implementing flexbox as specified. On the other hand, this does potentially affect shipped content. I believe inline/shrink-wrapped flexboxes to be rare, though.
Can someone bother to look at this case http://jsbin.com/pinerirogu/1/edit?html,css,output , it seems that there's still difference between Firefox and Chrome Canary. Can someone bother to explain why this hasn't been fixed by this issue? Or if Canary is not there yet?
See also: https://code.google.com/p/chromium/issues/detail?id=426898#c35
在 2015年8月6日星期四 UTC+8上午6:56:49,Christian Biesinger写道: