OrionReed / dom3d

Browser extension to view and debug the DOM in 3D space.
GNU General Public License v3.0
501 stars 11 forks source link

Force isolation: auto #13

Closed krzentner closed 5 months ago

krzentner commented 5 months ago

This fixes some websites (e.g. github, some of the Atom themes).

This partially fixes #10.

OrionReed commented 5 months ago

This is great. Was trying to see the effect of auto isolation and GitHub is a great test case. It's clearly not the only thing at play with the depth issues but it's a great (and super simple) improvement.

krzentner commented 5 months ago

Thanks! Unfortunately, I'm also not completely sure why this works, to be honest. The only element with isolation: "isolate" set on the github main page is the div directly inside the body. The only affect of that attribute according to MDN is to force the creation of a stacking context. However, we're also setting transform to a non-none value on this element, and that should already be creating a stacking context. It's also not clear to me why isolation: "isolate" on an ancestor element affects transforms on all descendant elements.

Edit: I figured it out. This isn't due to stacking contexts at all, but due to CSS Transforms explicitly looking for the isolation value.