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

Explorer scroll shadow is white on a dark theme after switching themes #141770

Closed
Tyriar opened this issue Jan 28, 2022 · 5 comments · Fixed by #141924
Closed

Explorer scroll shadow is white on a dark theme after switching themes #141770

Tyriar opened this issue Jan 28, 2022 · 5 comments · Fixed by #141924
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 28, 2022

I just switched recently from my Sapphire dark theme to Light+ and then back and I now see this:

image

The outlined one is overriding the good one:

image

The bad styles were in this <style> element if that's useful:

image
image

@bpasero
Copy link
Member

bpasero commented Jan 29, 2022

I also noticed this on vscode.dev switching from dark to light theme.

@alexdima
Copy link
Member

I think this is caused by the "duplicate" styling done by the menus. I believed the menus would normally insert CSS into the shadow DOM, but it looks like sometimes they insert styles to the main document. I'm not sure about the rest of the rules, but at least the scrollbar CSS doesn't need to be inserted in the global document as it will just duplicate / fight with the regular mechanism. But I think all other styles in that string might end up duplicated.

@sbatten Is it possible to just eliminate the else branch and avoid inserting these styles to the global document?

@alexdima alexdima assigned sbatten and unassigned alexdima Jan 31, 2022
@sbatten
Copy link
Member

sbatten commented Jan 31, 2022

Currently, most menus still use non-shadow DOM so the global styles are a requirement for these menus. Shadow DOM is used to parent the menu under an element to preserve focus but this sometimes causes bad rendering. Perhaps the shared context menu element should be placed under a shadow DOM and then styles would be inserted there

alexdima added a commit that referenced this issue Feb 1, 2022
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Feb 1, 2022
@alexdima
Copy link
Member

alexdima commented Feb 1, 2022

@sbatten I've prepared a PR at #141924

sbatten pushed a commit that referenced this issue Feb 2, 2022
@sbatten sbatten added this to the February 2022 milestone Feb 2, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Feb 24, 2022

/verified

Stable:

image

Insiders:

image

@rchiodo rchiodo added the verified Verification succeeded label Feb 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@bpasero @Tyriar @alexdima @aeschli @sbatten @rchiodo and others