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

RE: Ignoring empty paragraphs

From: Braden N. McDaniel <braden@endoframe.com>
Date: Mon, 10 Apr 2000 18:15:09 -0400 (EDT)
To: Matthew Brealey <webmaster@richinstyle.com>
cc: www-html@w3.org, gerald@w3.org
Message-ID: <Pine.LNX.4.10.10004101808160.7317-100000@boneone.endoframe.com>
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
> > 'empty-elements' property:
> > 
> >   P { empty-elements: ignore; }
> > 
> > Or an ":empty" pseudo-class:
> > 
> >   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 

Braden N. McDaniel
Received on Monday, 10 April 2000 18:11:41 GMT

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