W3C home > Mailing lists > Public > www-html@w3.org > April 2000

RE: Ignoring empty paragraphs

From: Ian Graham <igraham@smaug.java.utoronto.ca>
Date: Mon, 10 Apr 2000 18:21:54 -0400
To: "Braden N. McDaniel" <braden@endoframe.com>
cc: Matthew Brealey <webmaster@richinstyle.com>, www-html@w3.org
Message-ID: <Pine.SGI.4.05.10004101818361.9788-100000@smaug.java.utoronto.ca>

On Mon, 10 Apr 2000, Braden N. McDaniel wrote:
> On Mon, 10 Apr 2000, Matthew Brealey wrote:
> 
> > Jason Orendorff writes:
> > > There is already a CSS property 'empty-cells' that affects how empty
> > > table cells are rendered.  Perhaps there should be an
> > > 
> > >   P:empty { display: none; }
> > 
> > This is not necessary. Empty elements are 'ignored' by CSS, at least
> > with all current implementation's (except Netscape 4, which is so
> > completely broken that it will give different margins depending on
> > whether or not you include end tags on elements such as P) UA style
> > sheets. 
> 
> You are making assumptions, though, about the UA default style sheet here.
> There is nothing in the specs to prevent a UA default style sheet from
> including a rule
> 
>   p { border: 1px black solid }
> 
> If that were to happen, empty P elements would indeed be visible.
> 
> Granted, this is an edge case. But the bottom line is that your assertion
> that an "empty" pseudo-class is unnecessary hinges on unspecified 
> behavior.
> 

I agree. But it's interesting to note that Mozilla (M14) and IE 5 don't
render borders on 'empty' paragraphs ....  
(http://www.java.utoronto.ca/~igraham/html-tests/zero.html, et al.)

The handling of 'empty' <p>'s is a good example of unspecified behavior.

Ian
Received on Monday, 10 April 2000 18:21:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:43 GMT