Re: Should 'display: none' be handled by 'visibility'?

Andrew Fedoniouk wrote:
> 
> 
>> I'm not sure if this has been discussed before, but the display 
>> property has a minor problem. Often, {display: none} is used with dynamic
>> html, where an element could show or hide on demand. Hiding is easy, 
>> but once you need to reshow the element, you need to know the
>> appropriate display mode. There are many to choose from, and cannot 
>> safely be derived from the element name.
>> Since changing the display mode of an element is essentially different 
>> from just hiding it, wouldn't it be better if this was handled by
>> the visibility property? So {visibility: none} would work like 
>> {display: none} and take the element out of the flow, as opposed to
>> {visibility: hidden} which makes the element invisible while it 
>> remains in the flow.

Would you want it to behave like "display: none", or to actually collapse
to zero-height (which is different)? In the latter case, it would still
affect the horizontal size of boxes that shrink-wrap around it. This is
better for dynamic effects since it restricts layout changes to the y
dimension, and it is closer to what "visibility: collapse" does for table
rows.

~fantasai

Received on Friday, 27 July 2007 21:58:45 UTC