Re: [css3-flexbox] visibility:collapse on flexbox items

On Mon, Oct 3, 2011 at 2:36 PM, Ojan Vafai <ojan@chromium.org> wrote:
> Now that I understand the behavior of visibility:collapse in tables, I don't
> think we should extend the behavior elsewhere. We should just have
> visibility:collapse work the same way on flexboxes as it does elsewhere
> (i.e. like visibility:hidden). Otherwise, visibility:collapse becomes this
> complicated beast that noone can use because the rules are different for
> each display type.
> I agree with Alex that we need a way to show/hide items without wiping their
> display property, but we already have that with the "hidden" attribute (see
> http://www.whatwg.org/specs/web-apps/current-work/#hidden-elements).

Yeah, after talking with Hixie and Ojan about this, it seems like just
leaning on HTML's @hidden would be sufficient to solve the "hide an
item without wiping the display value" problem.  @hidden is just
implemented as "[hidden] { display: none; }" in the UA stylesheet.
Other languages can solve the problem similarly with their own
attribute/class/whatever.  We can then continue to work on splitting
'display' apart, which allows more solutions to this problem.

So, I'm inclined to revert the change I made a bit ago, and have
visibility:collapse go back to acting like visibility:hidden on
flexbox items, like everything else works.

~TJ

Received on Monday, 3 October 2011 22:00:17 UTC