Filters Applied to Root Element Break Fixed/Absolute Positioned Descendants
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
People
(Reporter: mozilla, Unassigned, NeedInfo)
Details
Attachments
(1 file)
729 bytes,
text/html
|
Details |
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.
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
Screenshot Comparing Firefox 78 to Chrome: https://i.stack.imgur.com/Oxvkb.jpg
Comment 3•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Comment 4•4 years ago
|
||
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.
Reporter | ||
Comment 5•4 years ago
|
||
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
Reporter | ||
Comment 6•4 years ago
|
||
![]() |
||
Updated•4 years ago
|
Reporter | ||
Comment 8•2 months ago
|
||
This is not "RESOLVED", as clearly showcased with executable snippets in this question at StackOverflow:
https://stackoverflow.com/questions/62717289/
Comment 9•2 months ago
|
||
Can you elaborate? Those work here, except the body {}
one which is expected.
Description
•