lavinmq.com docs are dark by design — Tailwind with hardcoded black backgrounds, no theme toggle, and no light mode at all. This script fabricates a light version: white background, dark text, normal readability.
lavinmq-light-theme.user.js*://lavinmq.com/*, *://*.lavinmq.com/*The LavinMQ docs are built with Tailwind CSS, and the dark look is baked directly into utility classes, e.g.:
<body class="bg-[#141414]"> <!-- near-black page background -->
.lmq-docs h1, .lmq-docs h2 { color: #FAFAFA; } /* near-white headings */
.lmq-docs p, .lmq-docs ul { color: #D9D6CE; } /* light-grey body text */
There's no .dark class, no data-theme attribute, no toggle — the site is simply dark, with no light mode to switch to. So the only way is to override its palette.
The script does nothing but inject one CSS block via GM_addStyle — no observers, no polling, no class toggling:
html:not(#_) to max out specificity, so with !important it reliably beats Tailwind utilities and the .lmq-docs nested rules;[class~="bg-[#141414]"] to match Tailwind arbitrary-value classes (no need to escape []#), recoloring the dark palette in place;.lmq-docs nested text colors for body/headings/tables.Pure CSS end to end — no DOM listening, no class mutation, so it can't freeze the page (a lesson learned from the RobustMQ script's v1 freeze bug).
| Element | Result |
|---|---|
| Page / navbar / sidebar background | White / light grey |
| Body text, lists, tables | Dark grey text #3c3c43 |
| Headings H1–H6 | Dark #1f2430 |
| Borders / dividers | Light grey #e2e2e3 |
| Inline code | Blue-grey text #476582 + light pill |
| Links | Readable dark green #15803d (original #54BE7E was too pale) |
| Code blocks | Kept as the site's dark Monokai highlighting (see below) |
The site's code blocks use Rouge + a dark Monokai theme (figure.highlight with #262626 background, near-white/pink tokens), tuned for a dark surface. The script intentionally does not flip them light — doing so would make the light tokens invisible on a light background. Dark code blocks on a light doc are common (GitHub et al.), and they stay perfectly readable as-is. Only inline code is restyled as a light pill.
lavinmq-light-theme.user.js into your browser and confirm in the prompt;To restore the original dark look, disable the script in Tampermonkey and reload.
There's a config block at the top of the script — just change the constants:
const BG = '#ffffff'; // page / navbar background
const BG_ALT = '#f6f6f7'; // sidebar / secondary surface (replaces #2f2f2f)
const BG_TER = '#ececee'; // tertiary surface (replaces #414040)
const TEXT = '#3c3c43'; // body text
const HEAD = '#1f2430'; // heading text
const MUTED = '#67676c'; // muted text
const BORDER = '#e2e2e3'; // borders / dividers
const CODE_COLOR = '#476582'; // inline-code text color
const CODE_BG = 'rgba(101, 117, 133, .14)'; // inline-code background
const LINK = '#15803d'; // link color (set 'keep' to preserve the original mint #54BE7E)
html:not(#_) [class~="new-dark-class-name"]{ background-color:#fff !important; }
To find class names: open DevTools (F12), select the element, and look at the bg-[#xxxxxx] / text-[#xxxxxx] tokens in its class.| Version | Notes |
|---|---|
| 1.0.0 | Initial; overrides the Tailwind dark palette + .lmq-docs nested text rules; inline code → light, code blocks kept as dark Monokai |