Closed Bug 1682380 Opened 5 years ago Closed 5 years ago

Negative text-indent not being applied in a flex layout, but it is in Chrome

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: twisniewski, Unassigned)

References

Details

Attachments

(3 files)

Attached file testcase.html

As reported on webcompat.com, Reddit has icons overlapping the text which should be next to them.

The basic issue is that a negative text-indent is not being applied the same way by Firefox, so the icon ends up overlapping with the text:

// HTML
<a target="_blank"><span></span>Should not overlap the X</a>

// CSS
span::before { content: "X"; }
a { display: flex; text-indent: -15px; }

I've attached a full reduced test-case; I'm not sure which behavior is correct here by spec.

I think this is a Chromium bug, not a Firefox bug.

Firefox and Chromium agree on the rendering if you use an explicit flex item (i.e. if you wrap the original testcase's "Should not..." text in an explicit element) Chrome has a different behavior when that text is in an anonymous box, for no good reason that I can see.

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

Attachment

General

Created:
Updated:
Size: