Skip to content

Diff pane ignores custom theme colors (hardcoded Tailwind CSS variables) #3567

Closed as duplicate

Description

@willzhqiang

Description

When using a custom theme with editor.colors.addition / editor.colors.deletion / editor.colors.modified configured, the diff pane (v2 WorkspaceDiff) ignores these theme values and uses hardcoded Tailwind CSS variables instead.

Root Cause

In WorkspaceDiff.tsx (lines ~70-86), gitDecorationColors hardcodes Tailwind CSS variables:

const gitDecorationColors =
    activeTheme.type === "dark"
        ? {
            addition: "var(--color-green-400)",
            deletion: "var(--color-red-500)",
            modified: "var(--color-yellow-400)",
          }
        : { ... };
const themeVars = {
    ...baseThemeVars,
    "--diffs-addition-color-override": gitDecorationColors.addition,
    "--diffs-deletion-color-override": gitDecorationColors.deletion,
    "--diffs-modified-color-override": gitDecorationColors.modified,
};

This overwrites baseThemeVars which correctly derives from getEditorTheme(theme) → getDiffViewerStyle(), making the theme's editor.colors settings ineffective for the diff view.

Expected Behavior

Diff colors should respect the custom theme's editor.colors.addition, editor.colors.deletion, and editor.colors.modified values. The getDiffViewerStyle() already correctly reads from the theme — removing the hardcoded override in WorkspaceDiff.tsx should fix this.

Steps to Reproduce

  1. Create a custom theme JSON with editor.colors section including addition, deletion, modified
  2. Import and activate the theme in Settings → Appearance
  3. Open the Changes tab to view a diff
  4. Observe that diff colors remain the default Tailwind green/red/yellow regardless of theme settings

Environment

  • Superset Desktop (macOS)
  • Custom theme with both terminal and editor sections defined

Activity

  1. Kitenite commented on Jul 11, 2026

    @Kitenite
    Member

    Closing as a duplicate of #5608, the consolidated tracker for stale themes-appearance issues from the July 2026 stale-issue sweep (no activity since 2026-06-01). If this still applies on a current build, comment on #5608 and we'll reopen.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions