Re: Inline h*ll

On Fri, 14 Jan 2000 02:40:59 -0800 (PST),
=?iso-8859-1?q?Matthew=20Brealey?= (thelawnet@yahoo.com) wrote:
> 
> --- Ian Hickson <py8ieh@bath.ac.uk> wrote:

> > However, previous
> > proposals from both David Baron and myself have suggested that to make
> > line-height work well for blocks, an anonymous inline should wrap all
> > blocks' contents. This would result in the same effect as with the
> > empty inline BR in the previous example, and is what both Opera 4 and
> > Mozilla 5 have implemented.
>  
> If you are wanting to browsers to diverge from the published
> specification, far better would be to encourage them to follow a sensible
> line box proposal in the first place.
> 
> As I see it, there is nothing that is useful in the current float
> specification, and a whole lot that is very bad. It is illogical,
> confusing and almost without any merit whatsoever.

The best reason to do anonymous inline boxes the way I suggest is
that it prevents non-presentational markup from having side-effects
in unexpected ways.  According to your interpretation of the
current spec, the following markup (with lines broken where shown):

Some text and
<big style="font-size: 200%">some bigger text</big>
in a paragraph.

would be rendered differently whether it was directly enclosed within a
p element with line-height: 120% or if it was entirely enclosed in a
(completely unstyled) span element within that p.

> Under my proposal, the enormous advanatage of having line box height set
> by line-height [wow! whatever next? - box heights being set by height?]
> exists.
> Under it, you would be able to say with confidence that the line box is
> the height of max(line-height, height). 

> It is also far more intuitive, and I cannot see any area in which the
> existing spec is better.

If line-height of a block sets the line-box height (which is what you
seem to be saying), then the following examples of commonly found
markup (and their CSS equivalents) would be a mess:

<p><font size="7">Text ...</font></p>

<p>Lots of text with some <font size="7">big text</font> in the middle.</p>

The line box height of the paragraph would be much smaller than the
font size, even if the line-height were a scaling factor, so the text
would overlap.  There would be no way to make only the line with big
text be bigger (which is what should normally happen).  That's
ridiculous.

-David

L. David Baron    Sophomore, Harvard (Physics)    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.     <URL: http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                      <URL: http://www.webstandards.org/css/ >

Received on Friday, 14 January 2000 09:46:08 UTC