Closed Bug 1955739 Opened 1 month ago Closed 1 month ago

<dialog> is layered below elements with opacity

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: xidorn, Unassigned)

Details

Attachments

(1 file)

Attached file dialog.html

Please see the attached file. I expect that either none of or both of the <div>s should cover the green dialog element, but what happens is that the one without opacity is below the dialog, while the one with opacity is above it.

I do notice that this behavior is consistent across all browsers I tested including Chrome and Safari, but I don't quite understand the logic behind it. I don't expect that opacity could affect z-position of the element itself.

Severity: -- → S3
Component: Graphics → Graphics: WebRender
Flags: needinfo?(gwatson)

opacity causes a new stacking context to be created. Within a single stacking context, absolutely positioned elements paint on top of statically-positioned elements.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INVALID

e.g. you can use any other stacking-context-creating property to get the same effect: position: relative, isolation, ...

Flags: needinfo?(gwatson)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: