Closed
Bug 971278
Opened 12 years ago
Closed 12 years ago
Inconsistent behavior of ::first-letter
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 597510
People
(Reporter: dev, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636
Steps to reproduce:
JS fiddle: http://jsfiddle.net/YQk9J/10/
Tried to change properties of the first letter of a sentence, which happened to be the "+" (PLUS symbol).
Actual results:
It just didn't work whatsoever, as if FF didn't support the pseudo-attribute. Putting a +, - or $ character along valid text boundaries markers makes it completely ignore the whole thing.
Expected results:
Every other browser I tested it with (latest chrome, latest opera, very old opera 12, latest IE, hell even opera mini) did just fine, correctly changed properties for those symbols.
Comment 1•12 years ago
|
||
The spec says:
Punctuation (i.e, characters defined in Unicode [UNICODE] in the "open" (Ps), "close"
(Pe), "initial" (Pi). "final" (Pf) and "other" (Po) punctuation classes), that precedes
or follows the first letter should be included
and
The ':first-letter' also applies if the first letter is in fact a digit, e.g., the "6"
in "67 million dollars is a lot of money."
But '+' is not a letter, not a digit, and not in the above punctuation classes as far as I can tell. So, as far as I can tell, per spec :first-letter should not be applying to it. Same for '$'.
Flags: needinfo?(dbaron)
So plus (U+002B) is in class Sm (Symbol, math; see Table 4-9 in Unicode 6.2).
(In reply to Boris Zbarsky [:bz] from comment #1)
> The ':first-letter' also applies if the first letter is in fact a digit,
> e.g., the "6"
> in "67 million dollars is a lot of money."
This wording doesn't say the it doesn't apply in other case, though.
I remember discussions of this issue in the past; I don't remember conclusions.
See, for example, http://lists.w3.org/Archives/Public/www-style/2010Aug/0063.html .
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Flags: needinfo?(dbaron)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•