Window ships with a complete dark mode theme out of the box. No JavaScript toggling or extra class names are needed — the browser automatically applies the dark styles whenever the user’s operating system is set to dark mode, thanks to a standardDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mr-sunset/window/llms.txt
Use this file to discover all available pages before exploring further.
prefers-color-scheme media query in style.css.
How it works
The entire dark theme is contained in a single@media block at the bottom of style.css:
body— swaps the bright pink-to-blue gradient for a deeper, muted indigo-to-purple gradient.#title-bar— changes the white background to a near-blackrgb(20, 20, 20)and darkens the separator border fromrgba(0,0,0,0.1)torgb(54, 54, 54).#window-container— sets the window shell’s background to the samergb(20, 20, 20)so the title bar and content area share a consistent surface colour.button— replaces the light grey button with a fully black background, and appliesrgb(100, 100, 100)to both the text colour and border, giving a subtle dark-on-dark appearance.
Colors in dark mode
| Element | Property | Value |
|---|---|---|
| Body background | background | linear-gradient(45deg, #34486a, #6b226f) |
| Title bar | background-color | rgb(20, 20, 20) |
| Title bar separator | border-bottom | 2px solid rgb(54, 54, 54) |
| Window container | background-color | rgb(20, 20, 20) |
| Button background | background-color | black |
| Button text | color | rgb(100, 100, 100) |
| Button border | border | 2px solid rgb(100, 100, 100) |
The
.mini and .maxi traffic-light buttons are not overridden in the dark mode block. Their colours — #e8c33d (yellow) and #69ca66 (green) — remain exactly the same in both light and dark mode. Only the .close button’s surrounding container changes; the button colour itself (#ff3939) is also unchanged. If you want the traffic lights to shift in dark mode, add explicit overrides for .close, .mini, and .maxi inside the media query.Override dark mode
To disable the built-in dark theme entirely, remove the@media (prefers-color-scheme: dark) block from style.css. The component will then always render with light-mode styles.
To override only specific properties — for example to use a custom dark background colour — add more specific rules after the media query block:
Force dark or light mode
To lock the component to dark mode regardless of the user’s OS preference, setcolor-scheme: dark on the body element and manually apply the dark styles via a .dark class:
color-scheme: light on body:
prefers-color-scheme: dark block from activating.