Skip to content

Config Compliance/Config Plan diff view (diff2html) is unreadable in dark mode #1152

Description

@agreen

Environment

  • Python version: 3.13.15
  • Nautobot version: 3.2.4
  • nautobot-golden-config version: 3.0.7

Expected Behavior

The Config Compliance / Config Plan diff view (rendered via the bundled diff2html 3.4.43 assets at nautobot_golden_config/static/nautobot_golden_config/diff2html-3.4.43/diff2html.min.css) should be legible when Nautobot is running in dark mode (<html data-bs-theme="dark">), matching the contrast of the rest of the themed UI.

Observed Behavior

diff2html.min.css ships a single, hardcoded light-mode palette with no dark-mode variant and no media query. Nautobot itself is otherwise fully dark-themed via Bootstrap 5's standard data-bs-theme="dark" attribute on <html>, but this vendored stylesheet never accounts for it. The result on any Compliance Details / Config Plan diff page in dark mode: bright white/pastel-pink/pastel-green table cells against near-black low-opacity text, sitting inside an otherwise dark UI — essentially unreadable, and visually jarring against the rest of the page.

Before:

before

After (#1153):

after

Steps to Reproduce

  1. Run Nautobot in dark mode (data-bs-theme="dark").
  2. Enable Golden Config's Compliance pillar for at least one device/rule so a ConfigCompliance diff exists.
  3. Navigate to a device's Compliance Details page (/plugins/golden-config/golden-config/<device_id>/compliance/) or a ConfigPlan detail page.
  4. Observe the diff2html-rendered diff table: white/near-white backgrounds, pastel pink (deletions) and pastel green (insertions), and a light-grey file-header bar — all low-contrast against the surrounding dark UI.

Fix

Opened as #1153.

Activity

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