W3C home > Mailing lists > Public > www-style@w3.org > January 2000

Re: first-letter tag soup

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Tue, 11 Jan 2000 13:24:00 +0100 (MET)
To: www-style@w3.org
Message-ID: <14459.7240.283041.737993@www43.inria.fr>
L. David Baron writes:
> Section 5.12.2 of CSS2 [1] says that first-letter pseudo-elements
> should include punctuation preceding the first letter of the paragraph.
> It also says that the formatting of the first-letter pseudo-element
> can be understood by placing a :first-letter element immediately
> around the first letter of the paragraph.  It gives the following
> example:
> 
> # <P>
> # <SPAN>
> # <P:first-letter>
> # T
> # </P:first-letter>he first
> # </SPAN> 
> # few words of an article in the Economist.
> # </P>
> 
> However, what happens to markup like:
> 
> <p>[<span>Text</span>]</p>
> 
> Both the '[' and the 'T' should be included in the first-letter
> pseudo-element.  This can't form a tree structure.  So how is that
> pseudo-element formatted?  What inherits from what?  Where do borders
> and backgrounds go (on both the span and the first-letter)?
> 
> The only solution I can think of would be that if such a thing were to
> happen, there should be no first-letter pseudo-element for that block.

That is IMHO a valid conclusion. It is OK to give up and not honour a
:first-letter if the situation is too complex.

There is a lot of "should" and "may" in section 5.12.2. The "tag soup" 
is not meant as the definition of the first-letter pseudo-element. It
is only there as a hint, precisely because you cannot always make a
tree structure out of the typographic structure.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Tuesday, 11 January 2000 07:24:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:02 GMT