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

[theming][editor] support selection foreground color #10622

Closed
Tyriar opened this issue Aug 17, 2016 · 7 comments
Closed

[theming][editor] support selection foreground color #10622

Tyriar opened this issue Aug 17, 2016 · 7 comments
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality themes Color theme issues
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 17, 2016

  • VSCode Version: Code - Insiders 1.5.0-insider (11ffcfc, 2016-08-16T06:12:46.372Z)
  • OS Version: Linux x64 4.4.0-34-generic, Ubuntu 16.04

It's difficult to read selected text when the theme is designed to change the foreground color:

image

@Tyriar Tyriar added feature-request Request for new features or functionality themes Color theme issues labels Aug 17, 2016
@aeschli
Copy link
Contributor

aeschli commented Aug 17, 2016

selectionForeground would be very difficult implement given that in our editor selection and text are two different layers. @alexandrudima Alex, correct me if I lie.
Also from what I read, selectionForeground seems to be a customization, not even supported by TextMate. So I'd suggest to close this request as 'won't fix'.

@Tyriar
Copy link
Member Author

Tyriar commented Aug 17, 2016

This is one of a few issues that make themes converted from sublime text look bad (another example #3429). The majority of our themes are converted from sublime or atom themes so shouldn't we provide similar support to those editors?

@alexdima
Copy link
Member

@aeschli is correct. The text and the selection are rendered as different layers. When the selection changes, the text is not repainted. This was implemented 5 years ago with performance in mind and without having selectionForeground in mind . Definitely a nice thing to have.

@aeschli
Copy link
Contributor

aeschli commented Aug 18, 2016

Surely it would be ideal if we fully support all the various text mate theme properties, but there will always be differences and features we don't or can't support.
It's up to the author of a VSCode theme extension to not just import a theme but also to test and -if necessary- tune some of the colors or settings so it works seamless in VSCode.

Closing won't fix given there's no plan on changing the current editor implementation in respect of keeping the selection layer separate from the text later.

@aeschli aeschli closed this as completed Aug 18, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Aug 18, 2016

Any reason this can't just be done using an !important rule on .token? Seems like an appropriate use of it.

@Tyriar Tyriar reopened this Aug 18, 2016
@aeschli
Copy link
Contributor

aeschli commented Aug 18, 2016

What if the selection starts in the middle of a token?
image
The token needs to be broken up. Also every token under a selection needs a class to be added and removed so it can be styled with the foreground color.
We can keep this request open if you prefer.

@aeschli aeschli added this to the Backlog milestone Aug 18, 2016
@aeschli aeschli removed their assignment Aug 18, 2016
@aeschli aeschli added the editor-core Editor basic functionality label Aug 18, 2016
@aeschli aeschli changed the title tmTheme selectionForeground is not supported [theming][editor] support selection foreground color Aug 18, 2016
@Tyriar
Copy link
Member Author

Tyriar commented Aug 18, 2016

Oh yeah, it's not native selection so .token::selection won't work. Nevermind let's close this, doesn't seem like it will get implemented.

@Tyriar Tyriar closed this as completed Aug 18, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality themes Color theme issues
Projects
None yet
Development

No branches or pull requests

3 participants