- From: Erik van der Poel <erik@netscape.com>
- Date: Fri, 26 Nov 1999 22:41:49 -0800
- To: Chris Lilley <chris@w3.org>
- CC: www-style@w3.org
Chris Lilley wrote: > > Erik van der Poel wrote: > > > > When the line-height is 1, the distance from baseline to baseline should > > be the same as the font size. Since some glyphs actually protrude above > > or below the em square, it is possible to get glyph collisions when the > > line-height is 1. That is another good reason for selecting a better > > value for line-height. Opera 3.60 and MSIE5 (without image) give the > > correct results for line-height. > > > > It seems to me that the background should be as tall as the inline > > element. Since David's page selects a line height of 1, some glyphs > > stick out of the inline box. Opera 3.60 correctly colors the background > > only inside the inline box. > > So it seems that a corollary of that is that padding should be set to > (as a minimum) whatever leading is added, as a good design rule. No, the padding is outside the content height, and the content height is the line box height if there is only one line, and the line box height is the inline box height if there is only one inline element, and the inline box height is the line-height of that inline element. So, you can use the line-height alone to make sure that glyphs don't protrude, and you don't need a non-zero padding to ensure this. Of course, you can have a non-zero padding with a line-height of 1 to get a similar effect, but my point is that you can use either the line-height or padding or both to make sure that glyphs don't protrude outside the background. But if the line-height is too small, glyphs will collide *inside* the content area (regardless of what happens outside the content area). > Otherwise, accents may protude outside the background+padding area. It does not make sense to talk of a "background+padding" area, since the background is defined to be content+padding. > > So it looks like Opera 3.60 is the only one to get all of them right. > > I reported the (less than optimal) results on ICE5 to icesoft and they > have fixed some of it already. Do you agree that Opera 3.60 passed David's test? Erik
Received on Saturday, 27 November 1999 01:43:12 UTC