CSS invert() filter doesn't work properly.

RESOLVED INVALID

Status

()

RESOLVED INVALID
4 years ago
4 years ago

People

(Reporter: hojkoj38, Unassigned)

Tracking

37 Branch
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
Created attachment 8557615 [details]
Screenshot.png

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150131004023

Steps to reproduce:

1. Add a user style with the following code to Stylish:

html {
    filter: invert(90%) !important;
    -webkit-filter: invert(90%) !important;
}

2. Load https:/www.google.com/.
Or:
https://www.bugzilla.org/
http://stackoverflow.com/
https://www.yahoo.com/
http://www.yandex.ru/


Actual results:

Not all parts of the web page are inverted.


Expected results:

All parts of the web page must be inverted.
The same user style works fine on chrome.
Trying Layout as a first approximation.
Component: Untriaged → Layout
Product: Firefox → Core
Seems to work for me. Of course areas where nothing is drawn don't invert as they are transparent and they stay transparent.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

4 years ago
(In reply to Robert Longson from comment #2)
> Seems to work for me. Of course areas where nothing is drawn don't invert as
> they are transparent and they stay transparent.

So the areas that are transparent for Firefox aren't transparent for
Chrome? Or Chrome inverts transparent areas, but Firefox doesn't?
Do you get the same result as on my screenshot?
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Isn't the real question here whether an "invert" filter on the <html> should invert the viewport background (which is not painted on the <html> itself, but on the viewport)?

Per spec draft:

  Conceptually, any parts of the drawing are effected by filter operations. This includes
  any content, background, borders, text decoration, outline and visible scrolling
  mechanism of the element to which the filter is applied, and those of its descendants.

which would not invert the viewport background.  Sounds like what Chrome implements doesn't match the current spec draft.  Do you want to raise the spec issue, or should I?
Flags: needinfo?(hojkoj38)
(Reporter)

Comment 5

4 years ago
Chrome's implementation makes more sense. The issue should be raised
and it would be great if you could do this, or tell me where can it be
done.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago4 years ago
Flags: needinfo?(hojkoj38)
Resolution: --- → INVALID
Send comments to the public mailing list public-fx@w3.org for discussion of the specification. When sending e-mail, please put the text “filter-effects” in the subject, preferably like this: “[filter-effects] …summary of comment…”
You need to log in before you can comment on or make changes to this bug.