- From: fantasai <fantasai@escape.com>
- Date: Wed, 15 Oct 2003 21:26:36 -0400
- To: www-style@w3.org
Ernest Cline wrote: >fantasai wrote: >>Constitution >>------------ >> >># Punctuation (i.e, characters defined in Unicode [UNICODE] in the >># "open" (Ps), "close" (Pe), and "other" (Po) punctuation classes), >># that precedes the first letter should be included, as in: >> >>What about punctuation immediately following the first letter? <snipped examples> > > > The :first-letter pseudo-element is a simple creature > and trying to complicate if for CSS 2.1 does not strike > me as a good idea. CSS 3 line does contain proposals > to address your concerns. Trying to do anything other > than possibly clarify how :first-letter works is not a good > idea IMO. Making how these situations should be handled explicit is a form of clarifying, imo. > :first-letter is one of those cute ideas that didn't get fully thought > thru before it was made part of the standard. It doesn't handle > every case well and trying to make it, is more trouble than it is > worth. While one can argue, as you have, that it would be better > if :first-letter did not apply to the content of :before or after, That > has been the defined interaction since CSS 2 and changing > it now would not be a good idea. I invite you to do an analysis of the implementations. >><http://fantasai.inkedblade.net/style/demos/first-letter/www-style> - IE (Mac & Windows) don't do generated content. - Mozilla doesn't float generated content, and it doesn't assign a :first-letter if the generated content is displayed block. Likewise for Safari. - Opera considers the first letter of the generated content as :first-letter except when the generated content isn't in the same block; i.e. when it's floated to the side or when it's been given display: block. In both such cases, it assigns :first-letter to the first letter of the /actual/ content. I don't see why it's such a terrible idea to change the behavior to make more sense, given the current state of implementations and the general lack of generated content out on the web. But it's now or never. However: Judging the suggested behavior on its own merits, there are two problems: 1. If the generated content is part of the block (i.e. not display: block or otherwise take out of the inline flow), then you can't use floating to create a drop-cap effect. (Floating the letter would take it out of the flow, moving it before the generated content.) I think the logicalness and usefulness of applying :first-letter to the actual content outweighs the chances that this combination will be a significant problem. (Right now there is _no_ way to address the first letter of actual content.) 2. As a much more common scenario: <p><q>Something to think about</q></p> "Something to think about" The correct typographical effect would be for first-letter styles to affect both the quotation mark and the 'S'. The quotation mark, however, is generated content. ~fantasai
Received on Thursday, 16 October 2003 01:28:23 UTC