- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Fri, 27 Feb 2009 09:29:42 -0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: Giovanni Campagna <scampa.giovanni@gmail.com>, www-style@w3.org
Boris Zbarsky wrote:
> Andrew Fedoniouk wrote:
>> Could you explain then why these two spans should look
>> so "dramatically" different?:
>>
>> <!DOCTYPE html>
>> <html>
>> <head>
>> <style>
>> span div { border:1px solid; }
>> span { padding: 0 20px; background: green; border: 2px solid red }
>> </style>
>> </head>
>> <body>
>> <span>aaa<div>bbb</div></span><br/>
>> <span>aaa<div style="display:inline-block;
>> width:100%;">bbb</div></span>
>> </body>
>> </html>
>
> Imo they should look the same except that:
>
> 1) in the latter case there are three boxes for the span: one of them
> contains the inline-block box.
> 2) It's not clear whether there should be a line-break after the
> inline-block box; it doesn't seem like there's a line-break
> opportunity there.
I also think that they should be rendered the same.
Two options:
1) To break this span because of the div
*while parsing to the DOM*.
2) If it gets into the DOM this way then these
two cases shall be indistinguishable to the
observer. This includes mouse hit testing too.
<span>aaa<div>bbb</div></span><br/>
<span>aaa<div style="display:inline-block;
width:100%;">bbb</div></span>
--
Andrew Fedoniouk.
http://terrainformatica.com
>
> -Boris
>
>
Received on Friday, 27 February 2009 17:30:25 UTC