Closed Bug 1609471 Opened 5 years ago Closed 4 years ago

When adding CSS "filter: invert()" to HTML tag, fixed position elements not working as they should

Categories

(Core :: CSS Parsing and Computation, defect)

73 Branch
x86
Windows 10
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1423746

People

(Reporter: belogolovnikas, Unassigned)

Details

Attachments

(1 file)

What were you doing?

I were in the localhost(the website i building)

  1. Working on JS Framework for people with accessibility's problems
  2. I added to the HTML tag rule of invert and the fixed element not worked normaly

What happened?

the fixed element stayed in place and didn't move with the page.

What should have happened?

The fixed element should work like before i added invert rule to the HTML tag.

Anything else we should know?

I have ad-block, tab session manager and Ecosia search engine.

Flags: needinfo?(belogolovnikas)

Thanks, I'm moving this to the Inspector component, since it's the part affected.

Component: CSS and Themes → Inspector: Rules

Thank you for filing this bug. However I'm having trouble reproducing the problem. I tried with a page like this:

<html>
  <body>
  <div style="width:50px;height:50px;background:red;font-size:10% !important;border: 0px none; outline currentColor none 0px;bottom:10px;position:fixed;left:5px;filter: invert(0%);"></div>
  </body>
</html>

Adding/removing the filter property doesn't change anything for me, the fixed position still seem to work.

Would you be able to provide an HTML page that shows the problem here?

(In reply to Patrick Brosset <:pbro> from comment #2)

It happens when i add to <html> tag or <body> tag

Flags: needinfo?(belogolovnikas)

Indeed, the issue occurs when these conditions are met:

  1. The element has position: fixed and a bottom offset;
  2. One of its ancestors has filter: invert();

The element disappears.

Try this reduced test case and use DevTools or the console to add filter: invert() to the <body> element:

(paste in the address bar)

data:text/html,<style>div {width: 50px;height: 50px;background: red;bottom: 10px;position: fixed;}</style><div>

We suspect the issue may be outside DevTools, perhaps in how CSS is applied & rendered.
I will change the component accordingly. Feel free to re-assign if that's not the right one.

Component: Inspector: Rules → CSS Parsing and Computation
Product: DevTools → Core
Summary: When adding to HTML tag CSS rule "filter: invert()" fixed elements not working as they should → When adding CSS "filter: invert()" to HTML tag, fixed position elements not working as they should

This was a spec change we need to make.

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

Attachment

General

Creator:
Created:
Updated:
Size: