W3C home > Mailing lists > Public > www-style@w3.org > February 2008

Re: [CSS21] visibility: collapse on non-table elements

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 14 Feb 2008 23:11:02 -0800
Message-ID: <47B53B06.7000008@terrainformatica.com>
To: Andrew Fedoniouk <news@terrainformatica.com>, fantasai <fantasai.lists@inkedblade.net>, www-style@w3.org

L. David Baron wrote:
> On Thursday 2008-02-14 09:23 -0800, Andrew Fedoniouk wrote:
>> Dynamic show/hide of elements. Used in many circumstances in scripts and in 
>> static CSS declarations.
> In what cases would this proposed feature be needed where
> display:none is not sufficient?

display:none makes the element completely invisible for
layout (placement calculation) algorithm.

In cases like this:
visibility:collapsed is highly desirable for computation of
panels inside this "accordion".

visibility:collapsed here is close to combination of following:

   min-width: min-intrinsic;

>> body[mode="bar"] .dependent
>> {
>>   display: ???; /* what to put here to show arbitrary element so to discard 
>> display:none? */
>> }
> Put nothing at all; the rule with display:none doesn't match
> anymore.

Generally true but not so convenient.

>> var el = ...;
>>     el.style.display = "none"; // to hide
>>     el.style.display = "????"; // how exactly to define "show" ?
> I use el.style.display="" quite often and it works fine for this.

That would work if this element has computed value of @display other 
than "none". If such element was initially defined as display:none then
el.style.display="" will lead to display:none.

OT: I think that el.style.display = null; is better to express intention 
of clearing local value of style attribute. I am not sure but empty 
string should not be a valid value of display attribute.

Andrew Fedoniouk.

Received on Friday, 15 February 2008 07:11:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC