fix(desktop): set missing CSS variables for diff viewer on custom themes

Closed
RO
5mo ago
+4-0

Summary

  • Set the 4 missing CSS variables (--diffs-light, --diffs-dark, --diffs-light-bg, --diffs-dark-bg) in getDiffViewerStyle() so context lines render with visible text on custom themes

Why / Context

On custom light themes, context lines (unchanged code) in the diff viewer were invisible — rendered in the same color as the background. The @pierre/diffs library resolves foreground/background via light-dark() CSS using these 4 variables, but Superset only set --diffs-fg and --diffs-bg when a single Shiki theme is registered (which is the case for all custom themes). Fixes #2684.

Impact

  • Diff viewer context lines are now visible on all custom themes (both light and dark)
  • Both light and dark CSS variable variants point to the same foreground/background since custom themes use a single theme (not a dual pair)

Validation

  • bun run typecheck
  • bun run lint
  • The fix adds the exact CSS variables that @pierre/diffs expects from its dual-theme code path

Fixes #2684