Closed Bug 1650522 Opened 4 years ago Closed 4 years ago

Filters Applied to Root Element Break Fixed/Absolute Positioned Descendants

Categories

(Core :: Layout: Positioned, defect)

78 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1423746

People

(Reporter: mozilla, Unassigned, NeedInfo)

Details

Attachments

(1 file)

Attached file filterBug.htm

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

I used CSS to apply a grayscale filter to the document root. As conveniently showcased here, where you can run the code snippets yourself:
https://stackoverflow.com/questions/62717289/

Actual results:

The div, which is prescribed to be dead center of the screen lost its positioning. See Update 2, in this question, and run the code snippet in both Firefox and Chrome:
https://stackoverflow.com/questions/62717289/

Expected results:

See the spec: https://drafts.fxtf.org/filter-effects/#FilterProperty

"A value other than none for the filter property results in the creation of a containing block for absolute and fixed positioned descendants unless the element it applies to is a document root element in the current browsing context. The list of functions are applied in the order provided."

Notice the part that says "unless the element it applies to is a document root", which is the case in Update2 of this question:
https://stackoverflow.com/questions/62717289/

Chrome honors this stipulation, but Firefox 78 does not. Please fix.

Screenshot Comparing Firefox 78 to Chrome: https://i.stack.imgur.com/Oxvkb.jpg

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Messaging System

This bug submission is currently classified under the wrong component, but my credentials won't allow me to change it.

This bug has to do with that fact that CSS filters that are applied to the root element are not supposed to have any effect on fixed or absolute positioned descendants. Please classify accordingly.

While this bug is dedicated to the very specific issue I described. I'm also trying to advocate changes to the spec that are voiced here:
https://github.com/w3c/fxtf-drafts/issues/402

I hope someone reading this will agree with what I'm saying and potentially explain it to the W3C better than I can.

Again, this is only a side-note, and is not the priority of this bug being reported

Status: UNCONFIRMED → NEW
Component: Messaging System → Layout: Positioned
Ever confirmed: true
Product: Firefox → Core
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

This is not "RESOLVED", as clearly showcased with executable snippets in this question at StackOverflow:
https://stackoverflow.com/questions/62717289/

Can you elaborate? Those work here, except the body {} one which is expected.

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

Attachment

General

Created:
Updated:
Size: