-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow the selection to be inverted #692
Comments
@Tyriar Giving this some thoughts, I'm afraid your idea above won't work once we ship the true-color support. I'm afraid we have to split background / selection / foreground into separate layers, and then manipulate the foreground and background cols that are within the selection. I'll have a go at splitting it into layers once we have truecolor merged. |
This is more of a nice to have, I don't think we would want to compromise performance/architecture or anything to make this possible. #720 is much more important imo. |
I have no time for a PR right now, but I discovered that we may use the css .xterm-selection-layer {
mix-blend-mode: exclusion;
} Additionally, even with a non-opaque selection color, this will make the foreground, selection and background visible: .xterm-selection-layer {
mix-blend-mode: multiply;
} Unfortunately, it doesn't seem to be supported by Edge atm. |
Closing as this is much more complex than it would initially seem to do right and not one has voted for it. Plus it would be yet another option. |
Since we can no longer use
::selection
this is no longer possible as it is with the current version of VS Code.There are a couple of challenges when approaching this problem:
One idea:
.xterm-rows
can be marked withxterm-invert-selection
class which invert background and foreground colors via CSS.z-index: 1
and the actual content of the row is added to the selection.aria-hidden
can then be added for good measure to ensure it's not read out twice.Not sure if it's the right solution though, I don't really like the duplication of text in the above solution but at least it's just on 2 rows.
The text was updated successfully, but these errors were encountered: