W3C home > Mailing lists > Public > www-style@w3.org > December 1997

Re: body:first-char and specificity of selectors

From: David Perrell <davidp@earthlink.net>
Date: Thu, 18 Dec 1997 11:49:51 -0800
To: <neil@bigpic.com>
Cc: "Style" <www-style@w3.org>
Message-ID: <01bd0bee$1afc3460$3c1cd9cf@davidp>

Neil St.Laurent wrote:
P:first-letter { font-size: 2cm; }
EM { font-size: larger; }

<P><EM>Hello</EM> out there puts an EXTREME emphasis on the first
letter of Hello, even though the EM would likely be happier with the
2cm on it's first letter:

I imagine an EMphasizer as most happy when allowed to emphasize.

However, I'm wrong about P:first-letter not having a child if I'm correct
about :first-letter properties displaying in EM. The first letter of EM is
child of P:first-letter and the remainder of EM is child of P:

  <P><P:first-letter><EM>H</EM></P:first-letter><EM>ello</EM> ... </P>

So, if not verboten by the CSS2 draft,

   P:first-letter EM { font-size: 2cm }

would give the effect you desire.

David Perrell
Received on Thursday, 18 December 1997 14:50:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:46 UTC