W3C home > Mailing lists > Public > www-style@w3.org > August 1996

RE: Problem with float left and drop caps

From: Jonas Salling <salling@cooper.xanthus.se>
Date: Tue, 6 Aug 1996 14:41:31 +0100
Message-Id: <96Aug6.154152gmt+0100.20487@BorderWare.upnet.se>
To: "'Hakon Lie'" <howcome@w3.org>
Cc: "www-style@w3.org" <www-style@w3.org>
After having implemented it in our browser, we are proposing
three additional "float" specifiers

float: <side-flow> (of) everything <wrap>
                        nothing
                        siblings

with "everything" being default.
Using these keywords, it is possible to specify what kind of
content is allowed to "flow" around the floating object.

Here are some examples to make things crystal clear:

(1)-----------------------------------------------------------
The "everything" keyword allows for *anything* to flow to the right
of a left floating object:

  p:first-letter { font-size:300%; display:block; float: left everything; }
  <p>This is the first line.
  <p>This is the second line.

  --- his is the first line.
   |  --- his is the second line.
   |   |
       |

(2)------------------------------------------------------------
The "nothing" keyword forces the following object to clear its left.
That is, nothing will flow to the right of a left floating object:

  p:first-letter { font-size: 300%; display: block; float: left nothing; }
  <p>This is the first line.
  <p>This is the second line.
  ---
   |
   |
  his is the first line.
  ---
   |
   |
  his is the second line.

(3)--------------------------------------------------------------
The "siblings" keyword will only allow objects in the same
(inner) block (siblings) to flow to the right of a left
floating object. Any other block will be forced to clear its left:

  p:first-letter { font-size: 300%; display: block; float: left siblings; }
  <p><img style="float: left;" ...>
  <p>This is the first line.
  <p>This is the second line.
  +---+--- his is the first line.
  |   | |
  |   | |
  |   |--- his is the second line.
  |   | |
  |   | |
  +---+

------
This functionality isn't too hard to implement, and it make the use
of floating objects like drop caps much more flexible and stable.
To use drop caps, you only have to define ONE rule. Plus you *don't*
have to care about the rest of the content.

Regards,
Jonas Salling, Project Manager, Xanthus International

----------
From: 	Hakon Lie
Sent: 	Tuesday, August 06, 1996 2:59 PM
To: 	Jonas Salling
Cc: 	www-style@w3.org
Subject: 	RE: Problem with float left and drop caps

Jonas Salling writes:

 > Wouldn't adding "clear: left" to the first-letter would look like this: 
 > ----- he first line
 >   |   he second line
 >   |
 >   |
 > -----
 >   |
 >   |
 >   |

Yes.

 > Adding "clear: left" to the containing P seems awkward...

That's what you will have to do. I don't find it awkward, but in the
case where you also have a floating image, you will not be able to
distinguish between the image and the drop cap since the drop cap is a
floating element. But, you would not want to combine floating images
with drop caps, would you?

Treating drop caps like any other element simplifies imlementations.
To meet your requirements, one would have to make special rules for
drop-cap elements, or introduce a general mechanism for dealing with
various levels of "clearing". Personally, I don't think it's worth it
for CSS1.

Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/people/howcome  howcome@w3.org
Received on Tuesday, 6 August 1996 09:42:19 GMT

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