![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Xah Lee wrote: «looks like fx 3.5 broke this css: div.nav:first-letter {font-size:3ex;color:#b22222} The first letter is not colored or bigger.» Johannes Koch wrote: Harlan Messinger schrieb: "Jonathan N. Little" wrote Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"? Seems Firefox 3.5 only apply the css to letters and not other chars? All other browser of current version seems to do the summation sign. Which behavior is correct? The behavior exhibited by Firefox 3.5. (After all, that's why it's called "first-letter", not "first-character" or "first-symbol". The specification even calls for special treatment, consistent with traditional treatment in the print world, for first letters that are preceded by punctuation, and so forth. See http://www.w3.org/TR/CSS2/selector.html#first-letter The spec above doesn't seems to be absolutely clear on whether non- letter chars should not be applied when using first-letter. |
|
I kinda think it's better if it applies to all unicode chars. |
#12
| |||
| |||
|
|
It's very clear that not all characters are considered "letters" for this purpose. |
|
The name of the pseudo-element is another really good clue to this. |
#13
| |||
| |||
|
|
Xah Lee wrote: Xah Lee wrote: «looks like fx 3.5 broke this css: div.nav:first-letter {font-size:3ex;color:#b22222} The first letter is not colored or bigger.» Johannes Koch wrote: Harlan Messinger schrieb: "Jonathan N. Little" wrote Is it "GREEK CAPITAL LETTER SIGMA" or "N-ARY SUMMATION"? Seems Firefox 3.5 only apply the css to letters and not other chars? All other browser of current version seems to do the summation sign. Which behavior is correct? The behavior exhibited by Firefox 3.5. (After all, that's why it's called "first-letter", not "first-character" or "first-symbol". The specification even calls for special treatment, consistent with traditional treatment in the print world, for first letters that are preceded by punctuation, and so forth. See http://www.w3.org/TR/CSS2/selector.html#first-letter The spec above doesn't seems to be absolutely clear on whether non- letter chars should not be applied when using first-letter. It's very clear that not all characters are considered "letters" for this purpose. The name of the pseudo-element is another really good clue to this. I kinda think it's better if it applies to all unicode chars. The practice that the feature is meant to support wouldn't work right if it did. The purpose is to support the very specific case of an existing style of printing where the first letter of each paragraph or section of a text is written as a "raised cap" or "drop cap", whatever that *letter* may be, and with such adjustments as applying the same special format to preceding punctuation--without requiring extra markup (span or whatever) to make this happen. If your purpose is to make a particular symbol larger, then style that symbol. It's no different a situation than the symbol you want to apply a special style doesn't happen to be the first character in a block. |
#14
| |||
| |||
|
|
On Jul 28, 11:11 am, Harlan Messinger hmessinger.removet... (AT) comcast (DOT) net> wrote: Xah Lee wrote: I kinda think it's better if it applies to all unicode chars. The practice that the feature is meant to support wouldn't work right if it did. The purpose is to support the very specific case of an existing style of printing where the first letter of each paragraph or section of a text is written as a "raised cap" or "drop cap", whatever that *letter* may be, and with such adjustments as applying the same special format to preceding punctuation--without requiring extra markup (span or whatever) to make this happen. If your purpose is to make a particular symbol larger, then style that symbol. It's no different a situation than the symbol you want to apply a special style doesn't happen to be the first character in a block. getting philosophical, i disagree with your view here. |
#15
| |||
| |||
|
|
Harlan Messinger wrote: It's very clear that not all characters are considered "letters" for this purpose. That much is clear, but it is much more difficult to tell which characters are considered as letters. The name of the pseudo-element is another really good clue to this. No, CSS names are so often clueless that none of them is a good clue to anything. If you read any semantics from an alphabetic string occurring in a selector, a property, or a property value, you do that on your own risk and often go all wrong. For example, the white-space property looks like affecting white space handling, but in fact, by the specs and by implementations, it also affects the rendering of a string that contains no whitespace characters. |
|
You could deduce from the name that the letter-spacing property affects spacing between letters. In fact, it affects the spacing between characters in general, whether they are letters or not. Or you might think that text-decoration is something decorative, but it isn't. There's no hint in the name :link that this pseudo-class only applies to _unvisited_ links. You might naively think that foo:before refers to a fictional element before foo, but it's really something _inside_ foo, just appearing before any content proper. |
#16
| |||||
| |||||
|
|
The additional difficulties include these: 1) The CSS "specs" say that :first-letter also includes any leading punctuation character, which is somewhat odd - if a line begins with a quotation mark and a letter, then these two are included into the pseudo-element :first-letter. |
|
3) For further confusion, they say: "Some languages may have specific rules about how to treat certain letter combinations. In Dutch, for example, if the letter combination "ij" appears at the beginning of a word, both letters should be considered within the :first-letter pseudo-element." That's really wild. It makes things language-dependent and even language version dependent; e.g., it's an open question whether "ch" in Spanish is one letter in some sense. |
|
(And what about English "th"?) |
|
And it leaves things wide open - are browsers really supposed to know the rules of all written languages in such matters? What _are_ the rules, really? |
|
Let's end this with one more foolishness: "If the letters that would form the first-letter are not in the same element, such as "'T" in <p>'<em>T..., the UA may create a first-letter pseudo-element from one of the elements, both elements, or simply not create a pseudo-element." Is that just idle babbling, or is it supposed to be part of a specification? |
#17
| |||
| |||
|
|
For example, the white-space property looks like affecting white space handling, but in fact, by the specs and by implementations, it also affects the rendering of a string that contains no whitespace characters. In what way? Are you thinking of line-breaking other than at whitespace? |
#18
| ||||
| ||||
|
|
1) The CSS "specs" say that :first-letter also includes any leading punctuation character, which is somewhat odd - if a line begins with a quotation mark and a letter, then these two are included into the pseudo-element :first-letter. That's typographically justifiable. |
|
The problem is that (as with so much of the specification HTML+CSS) they are trying to specify how things behave based on a (necessarily incomplete) knowledge of typography. |
|
It would be far better to specify something that was technically well defined and sufficiently general to let the web author define the behaviour that [s]he wants. |
|
That's really wild. It makes things language-dependent and even language version dependent; e.g., it's an open question whether "ch" in Spanish is one letter in some sense. If I remember correctly, it (along with ll) was, but now isn't in some official sense, though I've no idea what the typographical conventions were/are. |
#19
| |||
| |||
|
|
That's typographically justifiable. The problem is that (as with so much of the specification HTML+CSS) they are trying to specify how things behave based on a (necessarily incomplete) knowledge of typography. |
|
I've never been sure where the transitions between one and the other are in the w3 specs. When Phil Wadler made a formal definition of something for them (to do with XML, IIRC), they made the English description normative, not the formal spec, thus favouring legalistic argumentation over mathematical precision. |
#20
| |||
| |||
|
|
Jon Fairbairn wrote: I've never been sure where the transitions between one and the other are in the w3 specs. When Phil Wadler made a formal definition of something for them (to do with XML, IIRC), they made the English description normative, not the formal spec, thus favouring legalistic argumentation over mathematical precision. Theoretically, informative sections should be marked as such in the specs. The reason for making the prose normative instead of the formal grammar is that not everything can be specified with formal grammar. |
|
It is also rather difficult to cover all possible cases with mathematical precision |
|
--this came up with implementing display: run-in recently. |
![]() |
| Thread Tools | |
| Display Modes | |
| |