Re: One more run-in question: replaced elements

On Fri, Nov 20, 2009 at 11:22 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> I just realized that there's one more interesting edge case: replaced
> elements styled with "display:run-in".
>
> Testcase:
>
> <!DOCTYPE html>
> <html>
>  <body>
>    <img style="display: run-in"
> src="http://www.mozilla.org/images/mozilla-banner.gif">
>    <div style="border: 20px solid green">aaa</div>
>  </body>
> </html>
>
> Observed behavior:
> Opera 10.01: Image does not run in.
> Webkit 2009-11-20 nightly: Image does not run in.
> IE8: Image runs in.
>
> The IE8 behavior seems correct to me, given the spec text, right.

I can see how the Opera/Webkit behavior is justifiable.  By definition
CSS knows nothing about the contents of a replaced element.  Thus we
have no idea whether it runs afoul of the various restrictions on the
content of the run-in element that will prevent it from running-in.

It's probably justifiable from spec to say "Well, if we don't know
anything about the contents, then they don't fit any of those tests by
definition", but I'm not certain that's the best behavior.

(I'm also not sure what the most desirable behavior is to me as an author.)

~TJ

Received on Saturday, 21 November 2009 15:24:23 UTC