Re: Question about inline layout and margins

Boris Zbarsky wrote:
> On 8/9/10 7:35 AM, Anton Prowse wrote:
>> Yes, there's a line break opportunity after the first span, but since the
>> second span's margin area width is negative, I don't think I'd want that
>> opportunity to be taken; the second span (and indeed the inline-block)
>> still fits without widening the line box further.
> 
> I'm not convinced that that this is a good criterion for situations like 
> this, where the line box has already been forced to be wider than it 
> should be...

Fair enough.  This seems to me to be the core decision that we must make.

>> As for use cases, I guess if someone's gone to the trouble of trying 
>> to get the second span
>> to completely overlap the first, it's because that overlap is important
>> to them, and should be preserved even when the first span overflows its
>> containing block.
> 
> I can't tell whether your indexing is off here, or your numbers, but as 
> stated the sentence above makes no sense.

I don't /think/ so, but perhaps I'm overlooking something or I'm
misunderstanding you.  If all three inline-level boxes were to be placed
on the same line, the right margin edge of the inline box would be flush
with the right margin edge of the first span (and flush with the right
edge of the line box), right?  So the inline block completely overlaps
the first span.  If someone's gone to the effort of doing that (either
by using the second span, or more likely by directly using sufficient
negative left margin on the inline block), I'm saying that they might
not want the inline block to then drop down to the next line.

I'm not saying it's a particularly weighty argument; just pointing out
that it's not completely unreasonable to want to avoid a line break.

>> Either way, this relationship between overflow and fitting needs to be
>> specified (and be implementable)
> 
> Amen.
> 
> -Boris

Cheers,
Anton

Received on Monday, 9 August 2010 14:03:16 UTC