::first-letter font-size seems to be ignored when there is also a ::before, breaking a dropcap effect
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: twisniewski, Assigned: emilio)
References
()
Details
Attachments
(2 files)
See the attached test-case. The first-letter's size seems to be being ignored in Firefox, but not in Chrome or Safari.
This is currently breaking the drop-cap effect at Reuters on Firefox, overlapping the text.
Comment 1•3 years ago
|
||
It's not specifically the use of ::before
that is the root of the problem here, but rather that the ::before
content has position: absolute
, which removes it from the flow and should allow ::first-letter
to "capture" the following letter L. (Otherwise, ::first-letter
would apply to the first letter of the ::before
content itself.)
Example using only position: absolute
to reproduce the failure of ::first-letter
:
data:text/html,<style>p::first-letter{font-size:2em;color:red}</style><p><span style="position:absolute;top:100px">foo</span>bar
Here, Safari and Chrome apply the ::first-letter
styling to the "b", but in Firefox no content gets the ::first-letter
style.
Assignee | ||
Comment 2•3 years ago
|
||
Tests incoming (if this doesn't cause any existing test to pass).
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
Description
•