[CSS21] visibility: collapse on non-table elements

I'd like to raise the comments posted by Markus Jonsson and Andrew Fedoniouk
about the behavior of "visibility: collapse" as a CSS2.1 issue.
   http://lists.w3.org/Archives/Public/www-style/2007Jul/0153.html

Currently for internal table elements it collapses them to take up no room
but to still participate in width/height calculations. The goal is to make
dynamic show/hide operations smooth and efficient. This makes sense.

However, for non-internal-table-elements, it's currently defined to behave
as "visibility: hidden", which is not very useful. It just makes the element
invisible. I think smooth and efficient dynamic collapsing behavior makes
sense outside of tables as well, and that the definition should be changed
to be consistent with this use case.

Specifically, block-level elements with "visibility: collapse" should behave as
if their box was zero height with zero vertical padding, border width, and margins,
and inline-level elements with "visibility: collapse" should behave as if their
box was zero width with zero horizontal padding, border width, and margins.
Furthermore all descendants of a non-internal-table-element with "visibility:
collapse"--including descendants that are anonymous boxes--are also treated as
if they had "visibility: collapse".

~fantasai

Received on Thursday, 14 February 2008 10:03:19 UTC