banacorn / agda-mode-vscode

agda-mode on VS Code
https://marketplace.visualstudio.com/items?itemName=banacorn.agda-mode
MIT License
167 stars 38 forks source link

White text on grey background when using light theme #179

Open noughtmare opened 7 months ago

noughtmare commented 7 months ago

I'm one of those weird people using a light theme and with this extension the hyperlinks in goals show up as white text on a light grey background:

image

image

I've tried enabling and disabling the option to use highlighting, but that doesn't seem to change anything.

I observe a similar behavior with any of the standard light themes. The normal text changes between black and white, but the links always stay pure white.

I am using vscodium with this full version info:

Version: 1.85.1
Release: 23348
Commit: 08e6c15293922dd53a864bb041be381322fee401
Date: 2023-12-14T21:19:52.407Z (3 wks ago)
Electron: 25.9.7
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 23.1.0

And version 0.4.7 of the agda-mode plugin.

noughtmare commented 7 months ago

The issue seems to be that this extension is using the --vscode-button-foreground property which stays completely white even in most light themes, because it expects to be inside a button with a dark background.

The code that needs to be changed is here:

https://github.com/banacorn/agda-mode-vscode/blob/334ea9088c8f34fda97c92e8f80d9a2cdfba0aa3/style/variables.less#L24-L25

An easy way to fix it would be to treat holes and links the same and give them both the --vscode-textLink-foreground color, but I don't know if that is acceptable.

In the meantime I can work around this issue by changing the button colors in my settings:

"workbench.colorCustomizations": {
    "button.background": "#ffffff",
    "button.foreground": "#005fb8",
    "button.hoverBackground": "#cccccc"
}
banacorn commented 5 months ago

Yes, we should give them both --vscode-textLink-foreground, thank you!