Fix unreadable text in dark-themed editor tooltips
What does this MR do and why?
This MR fixes unreadable headings in dark-themed editor tooltips:
These headings are unreadable only in certain combinations:
- light GitLab color theme + dark syntax highlighting theme.
- dark GitLab color theme + light syntax highlighting theme.
The solution feels a bit hacky, but I didn't find a way how to override these specific styles via themes.
Investigation of the issue
-
I looked for possible color definitions in vscode repo, but the closest I got to changing this color was the following, by applying
'editorHoverWidget.foreground': '#ff0000'
, which only changes the text around the problematic heading: -
The problem is essentially caused by these styles:
Light GL theme + dark syntax highlighting | Dark GL theme + light syntax highlighting |
---|---|
![]() |
![]() |
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
- Go to Security & Compliance -> Policies and create a new policy. Example
- Switch to
.yaml mode
- Hover over the code with warnings
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #371333 (closed)
Edited by Martin Čavoj