- Load attached testcase.
The black box should be only as wide as its "Hello" text.
The black box is 400px wider than its "Hello" text. It adds in the main-size contribution of its
visibility:collapse collapsed-flex-item to determine its own size, and it probably should not do that, as discussed in https://github.com/w3c/csswg-drafts/issues/5985
The authoritative spec text here is section 9.9.1 at https://drafts.csswg.org/css-flexbox-1/#intrinsic-main-sizes (which we don't exactly implement yet, per bug 1055887). That section doesn't explicitly include or exclude collapsed flex items right now, but it probably should, per my github spec issue noted above, because the spec-section 4.4 about collapsed items has a side-comment that expects these items to be excluded from the flex container's main-size intrinsic-sizing.
Note: Chromium doesn't implement collapsed flex items right now (they just treat
visibility:collapse as an alias for
visibility:hidden). That's tracked in https://bugs.chromium.org/p/chromium/issues/detail?id=336604 . So, we shouldn't use them as a reference for correct-behavior on this.
 section 4.4 (https://drafts.csswg.org/css-flexbox-1/#collapsed-flex-item) says "...collapsing or uncollapsing items may change the flex container’s main size"