Closed Bug 1685247 Opened 4 years ago Closed 4 years ago

Layout bug with ::first-letter

Categories

(Core :: Layout, defect)

Firefox 85
defect

Tracking

()

RESOLVED DUPLICATE of bug 362880

People

(Reporter: jeroen.zwartepoorte, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15

Steps to reproduce:

https://codepen.io/jpzwarte/pen/VwKxJGR

I'm running FF developer edition 85.0b4 (64-bit).

Actual results:

See the screenshot. Notice the superfluous whitespace between the text and the dot.

Expected results:

No whitespace.

Component: Untriaged → Layout
Product: Firefox → Core

Workaround seems to be to set display: inline-block on .title. Works across all browsers.

Scratch that. Extraneous whitespace is still there with inline-block.

Attached file 1685247.html

This is bug 362880. The intrinsic width of the text "lowercase title" is measured wrongly as if it had text-transform: uppercase applied to the entire text. That is, Firefox measure the width as if the text is "LOWERCASE TITLE", which is larger than the final representation "Lowercase title" (with text-transform: uppercase applied only to the first letter).

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: