Re: run-in the middle of a block

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 UTC