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

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

From: Markus Jonsson <carnaby@passagen.se>
Date: Fri, 27 Jul 2007 13:18:50 +0200 (CEST)
Message-ID: <28492393.1185535130394.JavaMail.apache@eni-cpps15.sth.basefarm.net>
To: www-style@w3.org

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.

Markus
Received on Friday, 27 July 2007 11:19:18 GMT

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