Closed Bug 286385 Opened 20 years ago Closed 20 years ago

:first-letter should not recognize image as letter

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: uruviel, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050315 Firefox/1.0+ (bangbang023)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050315 Firefox/1.0+ (bangbang023)

When the first element in the element is an image firefox recognizes it as
:first-letter and thus not applying :first-letter to an actual letter.

Reproducible: Always
Attached file testcase
Probably not true because Opera 8.0 Beta 3 also shows this behaviour.
Attached file Extended test case
The text I meant to include with the above attachment was:

The description isn't quite accurate. Rather, when the first thing in a
paragraph (or whatever) is a block level element, then nothing matches
:first-letter.
Similar/Related to Bug 23701?
No, this is not bug 23701.  It looks like this part of first-letter behavior may
have changed from CSS2 to CSS2.1... Ian, is the first testcase correct?  That
is, should the first actual text letter (_after_ the image) be styled?
Um. Good question. Filed CSS2.1 post-CR issue 153. Please remain in the holding
pattern, we'll get back to you shortly.
Whiteboard: WG
Resolution:

We are going to add at the start of the first paragraph of 5.12.2:

  The :first-letter pseudo-element must select the first letter of the
  first line of a block, if it is not preceded by any other content
  (such as images or inline tables) on its line.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: WG
In that case, this bug is invalid; not sure why you confirmed it.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
bz: Sorry I read the initial description as saying we did match :first-letter to
a leading IMG, and didn't check for myself.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: