Closed
Bug 1260366
Opened 9 years ago
Closed 9 years ago
first-letter doesn't apply on dash [maybe another punctuation symbols]
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: worg, Assigned: MatsPalmgren_bugz)
Details
(Keywords: dev-doc-needed)
Attachments
(2 files)
26.26 KB,
image/png
|
Details | |
4.83 KB,
patch
|
jfkthame
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160328004018
Steps to reproduce:
Testcase
http://codepen.io/worg/pen/wGqBLd
Actual results:
The ::first-letter CSS pseudo-element rules aren't applied to the first element [the one containing a dash]
Expected results:
The CSS rules should apply to all elements
Updated•9 years ago
|
Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core
Assignee | ||
Comment 1•9 years ago
|
||
It seems CSS2 intentionally excluded the Pd class of punctuation (to which "dash" (002D) belongs).
https://www.w3.org/TR/CSS2/selector.html#first-letter
The relevant spec now says:
"Punctuation (i.e, characters that belong to the Punctuation (P*) Unicode general category [UAX44]) that precedes or follows the first typographic letter unit must also be included in the ::first-letter pseudo-element."
https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
Assignee: nobody → mats
Status: UNCONFIRMED → NEW
Component: CSS Parsing and Computation → Layout
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Version: 47 Branch → unspecified
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8736086 -
Flags: review?(jfkthame)
Assignee | ||
Comment 3•9 years ago
|
||
When this lands we should update the following text on the MDN page:
https://developer.mozilla.org/en/docs/Web/CSS/::first-letter
"Punctuation, that is any characters defined in Unicode in the open (Ps), close (Pe), initial quote (Pi), final quote (Pf) and other punctuation (Po) classes, preceding or immediately following the first letter is also matched by this pseudo-element."
The new spec text is the paragraph that starts with: "Punctuation (i.e, characters that belong to..."
https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
Keywords: dev-doc-needed
Comment 4•9 years ago
|
||
Comment on attachment 8736086 [details] [diff] [review]
fix+test
Review of attachment 8736086 [details] [diff] [review]:
-----------------------------------------------------------------
::: layout/reftests/first-letter/399941-2-ref.html
@@ +12,5 @@
> </head>
> <body>
> + <!-- Punctuation in class Pc should be included: there is a first-letter here -->
> + <p><span class="fake-first-letter">_I_,</span> said the Fly,</p>
> + <!-- Punctuation in class Pc should be included: there is a first-letter here -->
s/Pc/Pd/ in the second of these comments
Attachment #8736086 -
Flags: review?(jfkthame) → review+
Comment 6•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Assignee | ||
Updated•9 years ago
|
Flags: in-testsuite+
(In reply to Mats Palmgren (:mats) from comment #3)
> When this lands we should update the following text on the MDN page:
> https://developer.mozilla.org/en/docs/Web/CSS/::first-letter
> "Punctuation, that is any characters defined in Unicode in the open (Ps),
> close (Pe), initial quote (Pi), final quote (Pf) and other punctuation (Po)
> classes, preceding or immediately following the first letter is also matched
> by this pseudo-element."
>
> The new spec text is the paragraph that starts with: "Punctuation (i.e,
> characters that belong to..."
> https://drafts.csswg.org/css-pseudo-4/#first-letter-pseudo
Are you going to support text-emphasis* and opacity properties?
You need to log in
before you can comment on or make changes to this bug.
Description
•