bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

::first-letter float left top aligned

UNCONFIRMED
Unassigned

Status

()

Core
Layout: Text
UNCONFIRMED
3 years ago
2 months ago

People

(Reporter: skophek, Unassigned)

Tracking

(Depends on: 1 bug, {testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8713990 [details]
first-letter.html

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

Steps to reproduce:

Left-floated ::first-letter pseudo-element is displayed vertically top-aligned and (possibly) display-inline which cannot be changed. That's different result than how Webkit and Internet Explorer renders this.




Actual results:

Left-floated ::first-letter pseudo-element is displayed vertically top-aligned.


Expected results:

Left-floated ::first-letter pseudo-element is displayed vertically middle-aligned.

Updated

3 years ago
Component: Untriaged → Layout: Text
Product: Firefox → Core

Comment 1

2 months ago
skophek,

On 1 hand, section 9.5.1 
https://www.w3.org/TR/CSS22/visuren.html#float-position
states that floating box must be placed as high as possible inside a line box. On the other hand, section 5.12.2 
https://www.w3.org/TR/CSS22/selector.html#first-letter
indicates that first-letter pseudo-element inherits 'line-height' and Firefox fails to do that according to bug 290125.

I am also enclined that the image of rendered layout of The Economist example (drop cap floated first-letter pseudo-element) in section 5.12.2 may be wrong or inaccurate.

http://www.gtalbot.org/BugzillaSection/Bug1244447-First-letter-Float-example.html
Depends on: 290125
Keywords: testcase
Version: 43 Branch → Trunk

Comment 2

2 months ago
skophek,

In your attachment 8713990 [details] , the top-half (line-height minus content divided by 2) of the first-letter pseudo element is not rendered or not computed as part of its height in Firefox 52.8.0 ESR and in Firefox 62.0a1 buildID=20180518100150 but it is in Chromium 66.0.3359.117 and doing so is not clearly indicated wrong or as a violation in CSS 2.2

- - - - - -

I think that from now on browsers and rendering engine vendors will want to implement

CSS Inline Layout Module Level 3
3. Initial Letters
https://www.w3.org/TR/css-inline/#initial-letter-styling
You need to log in before you can comment on or make changes to this bug.