Re: :first-line errors

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
-- 
  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