Bug 70782 - Implement visibility:collapse for new flexboxes
Summary: Implement visibility:collapse for new flexboxes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 62048
  Show dependency treegraph
 
Reported: 2011-10-24 16:59 PDT by Ojan Vafai
Modified: 2013-02-26 16:38 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-10-24 16:59:15 PDT
The current spec text is "Similar to table cells, flexbox items respond specially to the ‘collapse’ value of the ‘visibility’ property. When a flexbox item is set to ‘visibility: collapse;’, the item does not generate a box at all (identical to setting ‘display: none;’)."

There's a bit of controversy over whether this is the right thing to do: http://lists.w3.org/Archives/Public/www-style/2011Oct/0136.html. If we could get away with changing visibility:collapse across the board without compat problems, that would clearly be best.
Comment 1 Ojan Vafai 2012-02-10 12:24:35 PST
The spec has changed to not mention visibility:collapse at all, which means that we should treat it as visibility:hidden. I expect this just works right now, but we should add some tests to verify.
Comment 2 Ojan Vafai 2012-05-23 13:54:26 PDT
The spec has changed to require special visibility:collapse behavior. http://dev.w3.org/csswg/css3-flexbox/#visibility-collapse

I don't especially love this behavior, but I don't care enough to argue it.
Comment 3 Tony Chang 2013-02-26 16:38:28 PST
Here's a test case:
http://plexode.com/u/#2J%222I%3E2H%3CEG8world29%3AfGHbrIr7*1459!16hello(E6JIf5!-webkit-flexr4px!solid!blue%3Br*!!)Jborder9!n)Hdiv!style%3Dn(H%2FdivI%0A2!%20~http://plexode.com/eval3/#ht=)Jdisplay95%3B6%0A7*14!visibility9collapse68G(7(

Basically, the middle div should have 0 width, but the height of the flexbox should be unchanged.  Currently, it creates width.