W3C home > Mailing lists > Public > www-style@w3.org > May 2000

Re: run-in the middle of a block

From: Matthew Brealey <webmaster@richinstyle.com>
Date: Wed, 03 May 2000 11:26:54 -0700
Message-ID: <39106F6E.5560@richinstyle.com>
To: www-style@w3.org
fantasai wrote:
> 
> What would happen if I put an element with display: "run-in" in the
> middle of a paragraph?
> 
> <P> Section 1: Here is some text. <SPAN style="display:
> run-in">run-in</SPAN> Section 2: Here's the rest of the paragraph.</P>
> 
> 1. The CSS2 spec says that the run-in becomes inline if it is followed
>    by a block.
> 
> 2. The CSS2 spec says that if the run-in is not followed by a block,
>    it itself becomes a block.
> 
> 3. The CSS2 spec says that the run-in becomes inline if it is followed
>    by a block.

Not quite: it says that 'if a block box ... follows the run-in box'
(although this is an erratum, because the box is not yet run-in: it
should be 'the element with "display: run-in"'). Thus because the
_element_ is not followed by a block box, this test fails [and here you
must stop: the test has failed], and the catch-all 'otherwise' applies
and the element becomes a block box followed by another block box. The
trouble is that you seem to want to imply a third step making the
process into a loop (i.e., you have introduced a loop rather than
if/else): you are saying 'if the element becomes a block box, causing
the next element to become a block box then go back and start again'.
You should not perform the check twice.

Added to the this is the fact that it doesn't make any sense to do the
other option.
Received on Wednesday, 3 May 2000 06:22:50 GMT

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