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

Re: CSS3 Pseudo-elements

From: fantasai <fantasai@escape.com>
Date: Fri, 03 Jan 2003 03:18:31 -0500
Message-ID: <3E154757.9080302@escape.com>
To: www-style@w3.org

Etan Wexler wrote:
> Michael Day wrote to <www-style@w3.org> on 31 December 2002 in
> "CSS3 Pseudo-elements"
> (<mid:200212301023.36617.mikeday@yeslogic.com>), quoting the CSS3
> Selectors Candidate Recommendation:
> 
>>   When the ::first-letter and ::first-line pseudo-elements are
>>   combined with ::before and ::after, they apply to the first letter or
>>   line of the element including the inserted text.
...
>>So can multiple pseudo-elements be used in a single selector or not?
> 
> Multiple pseudo-elements remain forbidden within a selector.
> 
> The prose deals with the case of two selectors, where each has a
> pseudo-element and where both select the same element.  The following
> rule sets are an example.
> 
> element-type::before {
>     content: "Prefix. ";
>     }
> element-type::first-letter {
>     font-size: 1.5em;
>     }
> 
> In this example, the user agent would render the letter "P" in a large
> font.

hm... That seems a bit awkward.

p {
   counter-increment: para;
}
p::before {
   content: counter(para, upper-latin) ". ";
}
p::first-letter {
   color: green;
}

   <p>This is the first paragraph.</p>

I would expect the 'T' in "This" to be green, not the 'A' before it.

Consider, especially, the 27th paragraph:

  AA. This is the twenty-seventh paragraph.

Coloring the first A green would look very strange.

IMO.


As for generated *words*:

p.note::before {
   content: "Note: ";
   color: #6666FF;
   border: 1px solid
}
p::first-letter {
   color: green;
}

<p class="note">This is a notice.</p>
  _____
|Note:| This is a notice.
  ŻŻŻŻŻ
I still think the 'T' should be green.

Perhaps the change should be to remove that sentence and note
instead that ::first-letter and ::first-line (if the pseudo's
a block and therefore has its own first line) do not apply to
pseudo-elements' content.

~fantasai
Received on Friday, 3 January 2003 03:20:00 GMT

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