Re: Inline h*ll

--- Ian Hickson <py8ieh@bath.ac.uk> wrote:
> On Fri, 21 Jan 2000, Matthew Brealey wrote:
> 
> >>>>> Another reason that this approach is better is that it
> >>>>> associates backgrounds with the line box rather than the text.
> >>>> This of course means that text can _easily_ flow outside the
> >>>> background, which is bad.
> >>> Not at all. Give me an example of how this could happen.
> >> Give your line boxes a short line-height (however you do that in
> >> your proposal) and your inlines a larger font.
> > This would occur under the existing specification - P {line-height:
> > .8} would result in at least the top of the text, and probably the
> > bottom (depending on your 'interpretation' (for which read 'change')
> > of the spec [) not having the background].
> 
> (I added the last bit because you seemed to have missed it. If that is
> not what you meant (I'm not sure) then disregard the next comment and
> tell us what you really meant.)
> 
> No! That would *not* cause the background to not appear under the text
> -- the background has NO RELATION to the line-height WHATSOEVER! It
> goes around the font box. 
[em square]
> See Eric's document for more exact details:
Indeed. The problem occurs with something like:
P {line-height: 1.4;
background: green}
SPAN.insideP {background: red}
SPAN.insideP's background would look stupid - it wouldn't be lined uo with
the top of the line box.
> 
> >> However, I've just realised an even worse problem with putting the
> >> background on the line box rather than the inline boxes. It makes
> >> it impossible to have a transparent part if the lines are far
> >> apart:
> > And how would that occur - line boxes are stacked without
> > separation?
> 
> In the CSS1 model, you can get the effect I describe using:
> 
>    block { line-height: 2; }
>    span { background: something; }
Under CSS as it stands, this would result in:
----------------------------|
|                           |
|                           |
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|                           |
|                           |
|---------------------------|
where m indicates the background, with the rest of the line box
transparent. This _would_ look ugly. Cf. my proposal:
----------------------------|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|mmmmmmmmmmmmmmmmmmmmmmmmmmm|
|---------------------------|



=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Received on Monday, 24 January 2000 05:54:51 UTC