Open
Bug 214004
Opened 21 years ago
Updated 2 years ago
::first-letter isn't applied if first letter is inside a child block
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
NEW
People
(Reporter: annevk, Unassigned)
References
(Blocks 2 open bugs, )
Details
(Keywords: testcase)
Attachments
(1 file)
(deleted),
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030726
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030726
This bug is spawned off from http://bugzilla.mozilla.org/show_bug.cgi?id=212145.
The generated content is now applied, but ::first-letter isn't applied.
Reproducible: Always
Steps to Reproduce:
1. Visit http://www.annevankesteren.nl/css/testcase/generated_content.html
2. The bold generated content should have a capitalized first letter.
Actual Results:
The first letter of the bold generated content wasn't capitalized.
Expected Results:
Capitalize the first letter
Related to http://bugzilla.mozilla.org/show_bug.cgi?id=212145
Comment 1•21 years ago
|
||
This seems like an issue with nested blocks, not with generated content...
Updated•21 years ago
|
OS: Windows XP → All
Hardware: PC → All
Summary: CSS ::first-letter isn't applied on generated content → CSS ::first-letter isn't applied if first letter is inside a child block
Reporter | ||
Comment 2•21 years ago
|
||
Not sure if this can help, but Opera 6.06 applies this correct.
Comment 3•21 years ago
|
||
Anne, the question here is what "correct" is. The CSS spec is not clear on
whether the ::first-letter applies through block children.
Comment 4•21 years ago
|
||
It does. The next draft of CSS2.1 will contain explicit text for this. It'll be
out Real Soon Now.
Reporter | ||
Comment 5•21 years ago
|
||
Besided that, it is a "pseudo element" and a "element" may be styled either
inline or block if I am correct.
Comment 6•21 years ago
|
||
OK. Taking bug, in that case. This should not be that hard to fix, I _think_
(though there may be some issues with nested blocks each of which has a
first-letter set on it).
Anne, I'm not sure what you're getting at in comment 5.
Assignee: dbaron → bz-vacation
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla1.6beta
Reporter | ||
Comment 7•21 years ago
|
||
Sorry for being unclear in comment 5. What I meant to say is that ::before is a
pseudo-element. A pseudo-element/element may be styled using the display
property. This way you can alter a pseudo-element from inline to block-level and
from block-level to inline.
Second thing is that the pseudo-element first-letter applies on the first letter
of generated content (e.g. ::before). If you combine this with the information
in the previous paragraph you understand why ::first-letter should apply on:
<div>
<div>aaa</div>
</div>
I hope this is a better explanation.
Reporter | ||
Comment 8•21 years ago
|
||
I'm not sure if bug 219770 is the same bug. I don't know _anything_ on the way
Mozilla works. Could someone take a look at it?
Comment 9•21 years ago
|
||
CSS2.1 is totally redefining how first-letter and first-line work, so we're
probably going to have to totally rewrite all the relevant code....
Priority: P3 → P5
Target Milestone: mozilla1.6beta → Future
Comment 10•21 years ago
|
||
not so much "redefining" as "defining", but yeah.
Original testcase is now 404:
http://www.annevankesteren.nl/css/testcase/generated_content.html
Attached testcase (attachment 128595 [details]), while not guidelines-compliant, is valid,
in that the first "a" should match the grandparent node's :first-letter pseudo.
Reporter | ||
Updated•21 years ago
|
Summary: CSS ::first-letter isn't applied if first letter is inside a child block → ::first-letter isn't applied if first letter is inside a child block
Comment 11•21 years ago
|
||
Not going to get to this any reasonable time.
Assignee: bzbarsky → nobody
Component: Style System (CSS) → Layout: Block and Inline
Priority: P5 → --
QA Contact: ian → core.layout.block-and-inline
Target Milestone: Future → ---
Comment 12•20 years ago
|
||
http://www.w3.org/TR/REC-CSS2/selector.html seems to be pretty clear about it..
(despite a grammar issue ;))
"Note that the :first-letter pseudo-element tags abut the content (i.e., the
initial character), while the :first-line pseudo-element start tag is inserted
right after the start tag of the element to which it is attached."
the fictional html sequence they use for this:
<P>
<SPAN>
<P:first-letter>
T
</P:first-letter>he first
</SPAN>
few words of an article in the Economist.
</P>
Reporter | ||
Comment 13•20 years ago
|
||
Please read and quote from CSS 2.1; the specification Mozilla is going to follow.
Updated•14 years ago
|
Blocks: css2.1-tests
Comment 15•12 years ago
|
||
Submitted related test to CSS 2.1 test suite:
CSS Test: First-letter - in-flow block descendant that contains text
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/first-letter-selector-028.htm
Gérard
Updated•6 years ago
|
Comment 18•4 years ago
|
||
CSS Test: First-letter - in-flow block descendant that contains text
http://wpt.live/css/CSS2/selectors/first-letter-selector-028.xht
Updated•2 years ago
|
Updated•2 years ago
|
Severity: normal → S3
Comment 19•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 3 duplicates.
:jfkthame, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Flags: needinfo?(jfkthame)
Comment 20•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Flags: needinfo?(jfkthame)
You need to log in
before you can comment on or make changes to this bug.
Description
•