-
-
Notifications
You must be signed in to change notification settings - Fork 564
Description
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Describe the bug
Enabling a high contrast theme, like the github high contrast one, does not apply a visible foreground color when selecting.
Themes that are meant to be "high contrast" in monaco use the editor.selectionForeground to apply a foreground color when selecting. However, this color is only used if the base of the theme is hc-black or hc-light. I did not find this anywhere specified, I figured it out by trial and error in the monaco playground.
For this to work, we need a way to tell high contrast themes apart. There is already a key in themes for type for the light/dark mode, relying on the name to have high contrast would be brittle.
Setting the base in shikiToMonaco to hc-black for a high-contrast theme enables high contrast mode in Monaco and applies the proper colors.
Reproduction
Contributes
- I am willing to submit a PR to fix this issue
- I am willing to submit a PR with failing tests