W3C home > Mailing lists > Public > www-style@w3.org > December 2006

Re: [CSS21] empty inline elements

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 24 Dec 2006 11:51:41 +0100
To: www-style@w3.org
Message-ID: <op.tk18gfqi64w2qv@id-c0020>

On Sun, 24 Dec 2006 11:30:50 +0100, Bert Bos <bert@w3.org> wrote:
> Not very strong arguments, are they? :-)

Depends on whether or not you want to exit CR at some point ;-)


>>   http://www.hixie.ch/tests/adhoc/css/box/inline/008.xml
>>   http://www.hixie.ch/tests/adhoc/css/box/inline/018.html
>>   http://www.hixie.ch/tests/adhoc/css/box/table/empty-cells/006.html
>> Perhaps it's better for empty inline elements to not generate empty  
>> inline boxes.
>
> Why should there be a difference between empty and non-empty elements? I  
> don't see why <span>x</span> should have different height and margins  
> then <span></span> (or indeed <span> </span>, even if the space is  
> collapsed).

Spaces are ignored for the definition of "empty element" as well it seems,  
except when white-space is set to pre or equivalent. (Same for comments,  
processing instructions and the like.)


> Anyway, you'll need empty elements to generate boxes for cases like  
> these:
>
>      strut {line-height: 2em}
>      square {margin-left: 1em}
>      another-square {content: "\2003" /* em space */}
>
>      <p>Some text<strut/> more text<square/> and <another-square/>
>
> Netscape's HTML extension <spacer> is also an example.

For those you could use inline-block, not?


Anyway, I'm happy to get our behavior "fixed", but I think we'll only do  
it after it has been fixed in Internet Explorer and Firefox. We're not  
really in the position to break pages.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Sunday, 24 December 2006 10:51:54 GMT

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