Skip to content

fix: use vscode theme variables for error panel colors - #72

Merged
TorreyBetts merged 2 commits into
DataficationSDK:mainfrom
marlonwq:fix/error-panel-theme-inheritance
Jun 13, 2026
Merged

fix: use vscode theme variables for error panel colors#72
TorreyBetts merged 2 commits into
DataficationSDK:mainfrom
marlonwq:fix/error-panel-theme-inheritance

Conversation

@marlonwq

Copy link
Copy Markdown
Contributor

This PR fixes an issue where the error panel in notebook cells hardcoded its background and text colors, making it unreadable on custom VS Code themes like Catppuccin.

I added CSS fallback chaining to the .verso-output--error class. It now prioritizes the native --vscode-inputValidation-errorBackground and --vscode-inputValidation-errorForeground tokens, falling back to the Verso tokens and static hex colors if the VS Code variables are missing (e.g., when running in the browser).

Fixes catppuccin/vscode#640

@TorreyBetts

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR to fix this issue. The fix belongs in a different spot, though.

In VS Code, the --verso-* variables are populated by the mapping block in vscode/src/blazor/blazorEditorProvider.ts (the :root style in the webview template). The bug is that it pairs inputValidation.errorBackground with errorForeground. On Catppuccin both are reds, making it unreadable.

Could you:

  1. Drop both app.css changes (the hex values there are fallbacks only and never apply in VS Code, and the browser host has no --vscode-* variables).
  2. Change the foreground line in blazorEditorProvider.ts to:
--verso-cell-error-foreground: var(--vscode-inputValidation-errorForeground, var(--vscode-errorForeground, #F48771));

This keeps the change scoped to VS Code, and doesn't mingle with Blazor server that's separate from the VS Code extension.

@marlonwq

Copy link
Copy Markdown
Contributor Author

Thanks for pointing me in the right direction! I updated the PR with your suggestions.

@TorreyBetts
TorreyBetts merged commit 2a77b3e into DataficationSDK:main Jun 13, 2026
5 checks passed
@TorreyBetts

Copy link
Copy Markdown
Contributor

Thanks for your contribution. This fix will be released in 1.0.22 or 1.1.0. We're juggling between the two because some important changes are nearly done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken theming in verso notebooks

2 participants