W3C home > Mailing lists > Public > www-style@w3.org > July 2007

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Fri, 27 Jul 2007 17:58:23 -0400
Message-ID: <46AA6A7F.7000207@inkedblade.net>
To: Andrew Fedoniouk <news@terrainformatica.com>
CC: Markus Jonsson <carnaby@passagen.se>, www-style@w3.org

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:51 GMT