Closed Bug 1834521 Opened 1 year ago Closed 1 year ago

Use of text-transform: uppercase in ::first-letter selector causing extra whitespace in inline-block elements

Categories

(Core :: Layout, defect)

Firefox 111
defect

Tracking

()

RESOLVED DUPLICATE of bug 385615

People

(Reporter: owen.jones, Unassigned)

Details

Steps to reproduce:

  1. Create an element containing text, styled with display: inline-block
  2. Add a selector to this element's CSS of ::first-letter and add text-transform: uppercase

Actual results:

The element adds unaccounted for whitespace to the end of the element text, extending the length of the element beyond it's text-defined width.

Codepen to illustrate the issue: https://codepen.io/owenatgov/pen/yLRZeZB

Expected results:

The element should not add extra whitespace to the end of the element text.

Component: Untriaged → Layout
Product: Firefox → Core
See Also: → 385615

Thanks for the bug report. This is a version of bug 385615.

Firefox is mistakenly sizing the element as if the whole element had text-transform: uppercase (rather than just the first letter). That's where the extra space comes from here.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 385615
Resolution: --- → DUPLICATE
See Also: 385615
You need to log in before you can comment on or make changes to this bug.