Re: font-size and accents, again

"L. David Baron" wrote:
> 
> On Sat, 27 Nov 1999 09:21:24 -0800, erik@netscape.com (Erik van der
> Poel) wrote:
> >
> > I think it's wrong to choose that definition. If a style sheet author
> > wants to make sure that glyphs don't bleed outside their background,
> > they must now set not only the line-height but also the padding. That's
> > a bit too much. It would be easier for authors if the padding and border
> > of an inline element were added to the *line-height* of that element
> > (not the font-size). Then the author can select a good line-height to
> > make sure glyphs in successive lines don't collide, and that
> > automatically makes the background tall enough to encompass all glyphs
> > vertically. (The default padding is zero, right?)
> 
> But think what would happen if it were around the line-height.  Then
> backgrounds and borders on inline elements with large values of
> line-height would be grotesquely tall.

Why would the line-height be so large? Why would the line-height be
(much) larger than your definition of font-size?

> (Such a change would also break
> backwards-compatibility with Opera 3.6, NN 4.x, WinIE5, MacIE4.5, and
> probably other browsers.)

Judging from the incompatibilities between the current browsers and the
numerous errors in CSS1 and CSS2, it seems to me that CSS is still in
its infancy. It's probably better to bite the bullet now and get it
right, rather than making a futile attempt to be compatible with all of
the current browsers.

Besides, Opera 3.6 and MacIE4.5 have such a small market share that they
can be ignored. Nav4's CSS was so buggy that Web sites probably refrain
from sending style sheets to it. That leaves WinIE5 and possibly IE4. As
far as I could tell, IE5 got line-height right, if there was no inline
image. Inline images are relatively rare. IE5 did strange things with
the background, but the line-height in your test was unusually small
(1). If you had chosen a better value for line-height, IE5's background
might have looked better.

(Yes, I'm a Netscaper, but I'm saying this in the interests of moving
CSS as a whole forward.)

Nevertheless, you have a good point. We should probably test some style
sheets against various browsers before making changes to the spec. I
think it would be a good idea to test "normal" style sheets with sane
values for the line-height (i.e. larger than 1), and sane values for
font-size (i.e. much smaller than 100px). Background might be a nice
thing to try, but how common do we expect padding and border to be with
inline elements? My gut feeling is that we should leave them out of our
test style sheet since authors probably won't use those that much.

Of course, a style sheet like yours, with large font-sizes, is still
nice to see if a browser implements the spec exactly right, but as far
as testing old browsers to see if our new spec is compatible is
concerned, I think we should stick to "normal" style sheets.

Erik

Received on Saturday, 27 November 1999 18:13:09 UTC