Comments (1)
Wow, okay, this one took me a while to figure out. Turns out that -webkit-filter
creates a stacking context. Who knew? Anyway, I use -webkit-filter
to uninvert images (you'll notice that in "Invert All Images" mode, the captioned text works perfectly). The problem is that the caption divs only appear because they've been positioned absolutely and given an opacity. This creates a stacking context and ensures that they'll appear above sibling elements that don't create their own stacking contexts. Normally the img tag on that page does not create a stacking context, so the captions appear above it, and everyone is happy. When I uninvert the image in order to display it normally, I apply a -webkit-filter
to it, creating a stacking context. Now there are problems because, z-indexes being equal, the image now stacks higher than the captions. The funny thing about this page in particular is that triggering the "popover text" by hovering over the captions adds a positive z-index to them, which causes them to once again appear above the image. After that happens Deluminate doesn't screw things up.
Whew! I created a minimal jsfiddle to demonstrate the problem. If you uncomment the position: absolute
line and re-run the jsfiddle, you'll see the blue box pop in front of the red one. This imitates the way the image covers up its own captions when it gets uninverted.
I have bad news, though: this behavior is specified by the standards. This is not a Chrome bug; it's actually how this is supposed to work (assuming that CSS filters are intended to create a stacking context, which seems as likely as anything else). Even worse, I can't imagine a way to programmatically detect and work around this situation in the general case. Nor is there a way to avoid using -webkit-filter
to uninvert images as far as I know, or prevent -webkit-filter
from creating a stacking context.
As far as I can tell, no fix for this can exist. Your best bet is to use custom CSS to style this site if the captions are really important to you.
from deluminate.
Related Issues (20)
- Desaturated Yellows in Chrome (Just search only? Unknown)
- Oh no plz let me remove it and return everthing back to default
- Enabling deluminate does not always invert scroll-bars, and causes the page and scroll-bars to 'blink' in a loop. HOT 1
- when I try to dim YouTube a bit, the whole page turns black
- Google Maps is not darkened in "Smart Invert"
- Google Docs text unreadable
- feature: Invert only on light/dark background.
- No real Keep Images Normal mode
- How can I modify the text cursor?
- Just an idea: allow toggle of deluminate per tab.... so many sites have dark mode now
- Images always inverting
- Google Drive Images show incorrectly with dark background
- Dim not working unless I click on the deluminate icon
- How we can enable the delaminate apply it work only on single tabs not the all the tabs
- Ebay recommended listings have images inverted.
- Can't paste or modify my site settings in Extension /options
- problem
- Please allow website settings to be separately saved by IP address AND port
- Microcenter filter text doesn't invert in Smart Invert or Keep Images Normal
- Unwanted flickering horizontal scrollbar when zoomed in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deluminate.