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

Fix focus border around editors with transparent background #209368

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/vs/editor/standalone/browser/standalone-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
clip-path: inset(50%);
}

.monaco-editor, .monaco-diff-editor .synthetic-focus,
.monaco-editor, .monaco-diff-editor [tabindex="0"]:focus,
.monaco-editor, .monaco-diff-editor [tabindex="-1"]:focus,
.monaco-editor, .monaco-diff-editor button:focus,
.monaco-editor, .monaco-diff-editor input[type=button]:focus,
.monaco-editor, .monaco-diff-editor input[type=checkbox]:focus,
.monaco-editor, .monaco-diff-editor input[type=search]:focus,
.monaco-editor, .monaco-diff-editor input[type=text]:focus,
.monaco-editor, .monaco-diff-editor select:focus,
.monaco-editor, .monaco-diff-editor textarea:focus {
.monaco-diff-editor .synthetic-focus,
.monaco-diff-editor [tabindex="0"]:focus,
.monaco-diff-editor [tabindex="-1"]:focus,
.monaco-diff-editor button:focus,
.monaco-diff-editor input[type=button]:focus,
.monaco-diff-editor input[type=checkbox]:focus,
.monaco-diff-editor input[type=search]:focus,
.monaco-diff-editor input[type=text]:focus,
.monaco-diff-editor select:focus,
.monaco-diff-editor textarea:focus {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you ignoring the non-diff editors? shouldn't it be something like

.monaco-editor .synthetic-focus, .monaco-diff-editor .synthetic-focus,
.monaco-editor [tabindex="0"]:focus,, .monaco-diff-editor [tabindex="0"]:focus,
.monaco-editor [tabindex="-1"]:focus, .monaco-diff-editor [tabindex="-1"]:focus,
...

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the initial intention behind the change. So can't tell for sure. @hediet can you chime in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the feeling what was attempted was (.monaco-editor, .monaco-diff-editor) .synthetic-focus, which unfortunately doesn't exist in css

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue that was fixed was about the diff editor. That is why I think .monaco-editor isn't relevant.

outline-width: 1px;
outline-style: solid;
outline-offset: -1px;
Expand Down