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

Re: :first-line errors

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Thu, 3 Feb 2000 18:29:06 +0100 (MET)
To: www-style <www-style@w3.org>
Message-ID: <14489.47592.344236.841058@lanalana.inria.fr>
Matthew Brealey writes:
> <blockquote
> cite="http://www.w3.org/TR/REC-CSS2/selector.html#first-line-pseudo">
> The :first-line pseudo-element is similar to an inline-level element, but
> with certain restrictions. Only the following properties apply to a
> :first-line pseudo-element: font properties, color properties, background
> properties, 'word-spacing', 'letter-spacing', 'text-decoration',
> 'vertical-align', 'text-transform', 'line-height', 'text-shadow', and
> 'clear'.
> </blockquote>
> This is a grave error. Vertical-align can have no effect since :first-line
> selects a line box, and line boxes are stacked without separation.

No, it doesn't select the line box (nothing in CSS ever selects the
line box, I believe), it selects the text in that line box.

It is possible in my mind (though probably not very useful) to move all
text in the first line to the superscript position, by saying

    P:first-line { vertical-align: sup }

(That would be the superscript position defined by the font of the P.)

  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 Thursday, 3 February 2000 12:29:18 UTC

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