Closed Bug 1789039 Opened 2 years ago Closed 2 years ago

z-index:-1 not obscuring a ::before border-effect under its source element in Firefox, but does in Chrome

Categories

(Core :: Web Painting, defect, P3)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: twisniewski, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file testcase.html

This bug is a spin-off of a webcompat.com report.

In the attached test-case, the blue border of the orange box (a ::before effect with z-index:-1 is drawing under the orange box in Blink/WebKit, but not in Firefox. I believe this should be working, and it does if I drop the z-index:6 on the main element.

This is affecting reinforceeu.eu's "Join our newsletter!" button, which is where the reduced test-case comes from.

I think our behavior is correct. z-index creates a stacking context so it doesn't let children escape. Chrome behaves the same if the span is display: block rather than display: inline, and I don't see why it should behave differently.

Severity: -- → S3
Component: Layout: Positioned → Web Painting
Priority: -- → P3

Chrome team confirmed it's their bug, see link there.

Status: NEW → RESOLVED
Closed: 2 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: