matthewhse — 2011-05-12T13:57:20-04:00 — #1
I've found what I think is a bug with Firefox 4's rendering of CSS of elements that include a background image on a first-letter pseudoclass.
Here's a sample document that exhibits the bug on every installation of Firefox 4 I have access to:
<title>Firefox 4 first-letter CSS bug</title>
background: url('/path/to/image.gif') no-repeat top left;
<p>This is a bit of a problem.</p>
The behavior I'm seeing is the page loads totally black, but will show the paragraph once some of the text is selected with the mouse or with CTRL + A. However, the rest of the page remains black.
On other real-world pages that contain this sort of code, scrolling may help things fill in sporadically over the page but not reliably.
Switching tabs and coming back to this one appears to correct the problem; the page will be rendered properly after that.
Particularly strange is the fact that, for me at least, even the browser tab often turns black in the middle where it would ordinarily display the title of the page.
The background image can be existent or non-existent; simply having the code present triggers the bug.
Has anyone else noticed this, or can anyone else reproduce it?
earlyout — 2011-05-12T14:19:50-04:00 — #2
No problem in FF4 here at all, with or without an actual background image present. IE9, on the other hand, doesn't display the background image behind the letter unless you give the page a proper DOCTYPE.
matthewhse — 2011-05-12T14:58:51-04:00 — #3
Thanks for checking. What OS are you on? I've tested on Vista and XP.
earlyout — 2011-05-12T15:54:51-04:00 — #4
No problem on Win7/64, Win7/32, or WinXP.
paulob — 2011-05-12T17:29:28-04:00 — #5
Works for me in FF4.01 xp also.