Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

fix dark mode docs drawer bg#1799

Merged
adhami3310 merged 2 commits intomainfrom
carlos/fix-dark-mode-bg
Mar 31, 2026
Merged

fix dark mode docs drawer bg#1799
adhami3310 merged 2 commits intomainfrom
carlos/fix-dark-mode-bg

Conversation

@carlosabadia
Copy link
Copy Markdown
Collaborator

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 31, 2026

Greptile Summary

This PR fixes the dark mode background color of the docs sidebar drawer by replacing !bg-slate-1 with !bg-secondary-1 — a single-line targeted fix.

Root cause: !bg-slate-1 mapped to --c-slate-1 (defined in assets/custom-colors.css), which is only declared under the .light/.light-theme selector and has no dark-mode override. This caused the drawer to render with a white/near-white background (#FCFCFD) in dark mode.

Fix: !bg-secondary-1 resolves through the Tailwind theme chain (--color-secondary-1--secondary-1--slate-1) to the Radix Colors slate-1 token, which correctly adapts to both light and dark color schemes via Radix's built-in CSS variable cascade.

  • The companion drawer (navbar_sidebar_drawer) already handles dark mode explicitly via dark:!bg-m-slate-12 !bg-m-slate-1; this PR adopts a cleaner semantic-token approach for docs_sidebar_drawer.

Confidence Score: 5/5

Safe to merge — minimal, well-targeted one-line fix with no logic or API changes.

Single-line CSS class swap that correctly replaces a light-only color token with a theme-aware semantic token. The token chain is confirmed in the codebase (tailwind-theme.css). No logic, state, or API changes are involved.

No files require special attention.

Important Files Changed

Filename Overview
pcweb/components/docpage/navbar/buttons/sidebar.py Replaces !bg-slate-1 (a light-only custom color with no dark-mode override) with !bg-secondary-1 (the Radix-backed semantic token that auto-adapts to dark mode) on the docs sidebar drawer content pane.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["bg-slate-1 (old)"] --> B["--c-slate-1 in custom-colors.css"]
    B --> C["Light only: #FCFCFD"]
    C --> D["❌ White background in dark mode"]

    E["bg-secondary-1 (new)"] --> F["--color-secondary-1 in tailwind-theme.css"]
    F --> G["--secondary-1 → --slate-1 (Radix)"]
    G --> H["✅ Light: #FCFCFD  |  Dark: adapts via Radix"]
Loading

Reviews (1): Last reviewed commit: "fix dark mode docs drawer bg" | Re-trigger Greptile

@adhami3310 adhami3310 merged commit c8a0c7e into main Mar 31, 2026
10 checks passed
@adhami3310 adhami3310 deleted the carlos/fix-dark-mode-bg branch March 31, 2026 18:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants