RE: Whitespace, punctuation and :first-letter

Simon,
  You raise a good question. It is clear to me that the intent of "first-letter" is to include punctuation that precedes the first "real" letter. But, your case has introduced a space before the first "real" letter. This particular example does not seem to have a use case associated with it. Why would anyone put a space in a "first-letter" situation without the intent that the space terminate the "first-letter" handling. For that reason, I would say that Opera has the correct answer. But, if someone can provide a use case for your example, I would consider it.

Steve Zilles


> -----Original Message-----
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Simon Fraser
> Sent: Tuesday, October 05, 2010 5:33 PM
> To: www-style list
> Subject: Whitespace, punctuation and :first-letter
> 
> I'm trying to fix some WebKit issues around :first-letter. The spec
> <http://www.w3.org/TR/CSS2/selector.html#first-letter> is not clear about
> how punctuation and whitespace interact, and there does not seem to be
> interop in this area. For example, with the following content:
> 
> <style type="text/css">
> div:first-letter { color: green; }
> </style>
> 
> <div>( T)est</div>
> 
> In Safari, the ( and T are green.
> In Opera, the ( is green.
> In Firefox, nothing is green.
> 
> Simon
> 

Received on Wednesday, 6 October 2010 04:10:31 UTC