- From: L. David Baron <dbaron@fas.harvard.edu>
- Date: Wed, 10 Nov 1999 09:05:44 -0500 (EST)
- To: thelawnet@yahoo.com, www-style@w3.org
On Wed, 10 Nov 1999 03:11:24 -0800 (PST),
=?iso-8859-1?q?Matthew=20Brealey?= (thelawnet@yahoo.com) wrote:
>
> 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. This can happen
anywhere where a line-height that is not a scaling factor is used.
This is why one should never use line-heights other than scaling
factors (unitless) in good CSS.
> The dangers of inherit:
> Consider:
> * {property: inherit}
>
> where the user has BODY {property: value !important}.
>
> The result might be somewhat unexpected to say the
> least, and could result in unreadable pages unless you
> are careful. (E.g., BODY {background-color: black;
> color: white} * {background-color: inherit} with user
> stylesheet BODY {background-color: white !important}
> [perhaps because said user dislikes all those pages
> with fancy backgrounds]
This is not a danger specific to the 'inherit' value. It is a problem
related to specification of colors and the inability to group
declarations. It has been discussed before. See, for example, [1] and
[2] (and the threads that followed).
David
[1] http://lists.w3.org/Archives/Public/www-style/1998Oct/0020.html
[2] http://lists.w3.org/Archives/Public/www-style/1999Mar/0013.html
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 Wednesday, 10 November 1999 09:05:45 UTC