Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force isolation: auto #13

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Force isolation: auto #13

merged 1 commit into from
Mar 29, 2024

Conversation

krzentner
Copy link
Contributor

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

This partially fixes #10.

This fixes some websites (e.g. github, some of the Atom themes).
@OrionReed
Copy link
Owner

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.

@OrionReed OrionReed merged commit b894358 into OrionReed:main Mar 29, 2024
@krzentner
Copy link
Contributor Author

krzentner commented Mar 29, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some websites (like GitHub) appear flat when their DOM clearly isn't
2 participants