Skip to content

Feature Request: Add Dark Mode Toggle and System Preference Sync #326

Description

@HereIsMuhammad

Context / Problem

Currently, the X Open Source website (opensource.x.com) primarily defaults to a light interface. Many developers browse repositories, check open-source initiatives, and read tech stacks in low-light environments or use system-wide dark themes to minimize eye fatigue.

Since the main X platform highly prioritizes dark theme options (Dim and Lights Out), the open-source website should ideally provide a cohesive user experience.

Proposed Solution

Introduce a native theme-switching feature that includes:

  1. Automatic Detection: Listen to system preferences dynamically using prefers-color-scheme: dark.
  2. Manual Toggle: Add a minimal, accessible toggle icon (such as a 🌙 / ☀️ icon) in the header or footer navigation bar so users can override system preferences.
  3. Persistent Storage: Save the chosen theme in localStorage so the setting persists across page reloads.

Benefits

  • Accessibility: Improves readability for visually sensitive users.
  • Consistency: Aligns the portal's aesthetic closer to the dark UI configurations of modern developer portals and X itself.
  • Better UX: Prevents sudden bright screen flashes when transitioning from standard developer setups (IDEs/GitHub in dark mode) to this website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions