Re: The dangers of inherit; the dangers of first-letter; errors in spec on float; new float rules; mistake in clear example; background-sound; @viewport

--- "L. David Baron" <dbaron@fas.harvard.edu> wrote:
> On Wed, 10 Nov 1999 03:11:24 -0800 (PST),
> =?iso-8859-1?q?Matthew=20Brealey?=
> (thelawnet@yahoo.com) wrot7e:
> > 
> > The dangers of :first-letter:
> > 
> > Consider
> > P {
> > line-height: 1.5em;
> > font-size: 12pt;
> > }
> > H1 + P:first-letter {
> > /* Inherits 18pt for l-h */
> > font-size: 72pt;
> > float: left;
> > width: 1em
> > }
> > This is perhaps worth emphasising in the spec
> 
> This is not a problem specific to first-letter. 
Yes, but you are most likely to have a font-size out
of proportion with the line-height on first-letter and
are less likely to notice the fact that l-h should be
changed (especially when no known browser does this
correctly:
P {font-size: 12pt;
line-height: 1.5em}
SPAN.first {font-size: 72pt;
float: left;
}
Most (probably all) browsers ignore the line-height
declaration, and give the drop cap a height based on
font-size (plus a non-padding, non-margin set extra
bit) rather than on line-height (recall that floats
are classed as block elements for the purposes of
height: auto, and thus the  height is from the top of
the uppermost line box to the bottom of the bottom one
- thus = 12pt.) As a result, if and when a compliant
CSS 1 (!) UA arrives, the SPAN.first will look
ridiculous (not to mention the fact that the floating
box will have zero width (note this is a non-l-h
related bug) because width is not requried by the
present generation of browsers.
).

> This is why one should never use line-heights other
> than scaling
> factors (unitless) in good CSS.

This is true of course.

However, scaling factors don't work in very many
browsers (:-(). As a result, they are effectively
unusable. 

As a result authors are best advised to use other
units. My point was just a brief note on this fact. 



=====
----------------------------------------------------------
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!?
Bid and sell for free at http://auctions.yahoo.com

Received on Wednesday, 10 November 1999 09:32:12 UTC