Skip to content

chapelsoftware/DimX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dim for X

A Chrome extension that restores the classic Dim (dark navy) color scheme to x.com, replacing the Lights Out pure-black theme.

X.com still ships the full Dim theme CSS variables internally, but no longer exposes it as a user-selectable option. This extension flips the theme attribute back to "dim" and patches the hardcoded black colors that bypass X's theme system.

How it works

  1. Theme attribute override — A content script sets data-theme="dim" on both <html> and <body> at document_start (before X's JS runs) and uses MutationObserver to keep it from being reset.

  2. CSS overrides — A stylesheet catches all the places X hardcodes pure black outside the CSS variable system: React Native Web utility classes, Tailwind classes (bg-black, dark:bg-black, gradients), inline styles, and sticky headers.

  3. Fallback variables — A complete copy of X's Dim CSS variable definitions is included in case they're ever removed from the site.

Dim palette

Role Color Value
Primary background #15202B hsl(210, 34%, 13%)
Secondary background #192734 hsl(213, 25%, 16%)
Hover/elevated background #253341 hsl(211, 24%, 20%)
Border #3D5466 hsl(210, 21%, 28%)

Installation

  1. Clone this repository
  2. Open chrome://extensions in Chrome
  3. Enable Developer mode
  4. Click Load unpacked and select the project folder

Files

File Purpose
manifest.json Manifest V3 extension config
content.js Sets and maintains data-theme="dim" on the page
styles.css CSS overrides for hardcoded black colors
dim-theme-fallback.css Complete Dim CSS variable definitions extracted from x.com
icons/ Extension icons (16, 32, 48, 128px)

License

MIT

About

Return Dim theme to X.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors