Re: New CSS1 draft available

Bert Bos wrote:
> ... Let's try to develop the list of requirements. Given
> markup like this:
> 
>       <X>Heading</X>
>       <Y>Text text text...</Y>
> 
> we need ways to do all of the following:

(#1 needs no comment. #4 is simple left float with width specified.)

#s2, 3, and 5 would be easy with a 'run-on' or 'multi-line float'
property. When X is given this property, each line of X would be
treated as a separate floating text block, with the width of each block
being the width of the text on that line. Y would flow relative to the
last line of X. The X-Y distance would be specified by the right margin
of X and the first-line indent of Y. Relative vertical alignment could
be fine-tuned with margins.
 
> 2. Simple run-in headings:
> 
>       HEADING Text text text
>       text text text...

With the short heading, #2 works the same as a standard float. The
first line indent on Y should be relative to the right margin of the
last line of X. X may need a negative bottom margin to allow the second
line of Y to start at the left margin.


> 3. Text Y must start at a specific horizontal position:
> 
>       HEADING  Text text text te-
>                xt text text...
> 
>       LONG HEADING
>                Text text text te-
>                xt text text...
> 

Same as #2, except that Y is floated right with a specified width. This
is the same way a couple of adjacent images are treated now when one is
align=left and the other align=right.


> 5. X has different indent from Y:
> 
>       HEADING Text text text text
>         text text text text text
>         text text...
> 
>       A VERY LONG HEADING OF MORE
>       THAN ONE LINE Text text te-
>         xt text text text text
>         text text...

Same as #2 except that X and Y have different left margins.

This property really shouldn't be that hard to implement. Just break
multiple lines of X normally and put an imaginary float box around the
last line.

Maybe this should be the default model for floated text, with a box
around the whole paragraph only when a width is supplied.

This 'separate box for each line of a floated text block' model
corresponds to the way MSIE 3 treats unfloated text block backgrounds
now (which is not the way the CSS1 spec specifies, and is not as useful
as a single rectangular box, IMHO).

David Perrell

Received on Monday, 16 September 1996 08:20:13 UTC