W3C home > Mailing lists > Public > www-amaya@w3.org > October to December 2006

[CSS] 'display: none' blocks still break surrounding inline content into different blocks

From: Stanimir Stamenkov <stanio@myrealbox.com>
Date: Tue, 03 Oct 2006 15:44:04 +0300
Message-ID: <45225B14.70406@myrealbox.com>
To: www-amaya@w3.org
HTML block elements which have |display: none| applied to them still 
cause the surrounding inline content to be laid out in different 
anonymous block boxes (see the attached "anon_blocks.html").

In the CSS 2.1 specification 
<http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level>:

> In a document like this:
> 
> <DIV>
>   Some text
>   <P>More text
> </DIV>
> 
> (and assuming the DIV and the P both have 'display: block'), the DIV 
> appears to have both inline content and block content. To make it 
> easier to define the formatting, we assume that there is an 
> anonymous block box around "Some text".

But in the case:

<DIV>
   Some text
   <P>More text</P>
   Yet more text
</DIV>

and given the <P> element has |display: none| applied (i.e. <P> is 
no longer a block) - Amaya still breaks "Some text" and "Yet more 
text" into different block boxes.

In the attached example there's also a case like:

<DIV>
   Some text
   <SPAN></SPAN>
   More text
</DIV>

and the <SPAN> element has |display: none| applied - Amaya doesn't 
collapse the resulting white space and renders two spaces between 
"Some text" and "More text".

-- 
Stanimir


Received on Tuesday, 3 October 2006 12:44:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:37 UTC