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

Floated pseudo-elements

From: David Perrell <davidp@earthlink.net>
Date: Wed, 17 Dec 1997 17:38:46 -0800
To: "Style" <www-style@w3.org>
Message-ID: <01bd0b55$ae53dfe0$421cd9cf@davidp>
I think it should be clarified in the CSS spec that when a pseudo-element is
floated, the pseudo-element content is selected before any
pseudo-element-specific formatting is applied.

Consider the non-floated :first-line pseudo-element of the following
paragraph:

   The first line of this block
   is followed by the second line
   is followed by the third line.

If letter-spacing is increased, the content of the non-floated :first-line
pseudo-element will change:

   T h e  f i r s t  l i n e  o f
   this block is followed by the
   second line is followed by the
   third line.

In the case of a floated :first-line, however, the pseudo-element content
must be selected based on the formatting of the element before the
pseudo-element formatting is applied.

For example, here the letter-spaced :first-line has been floated left with a
negative left margin and an explicit width:

  T h e  f i r s t     is followed
  l i n e  o f         by the
  t h i s   b l o c k  second line
   is followed by the third line.

I'm not claiming this is a useful example, just that it's better to define
general behavior than ad hoc restrictions.

David Perrell
Received on Wednesday, 17 December 1997 20:39:06 GMT

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