/wiki/manage rendered its table in near-black on the near-black page. The theme repaints Bootstrap's LIGHT colour mode dark but never overrode $body-emphasis-color, which Bootstrap defaults to $black. Any component that chains to --bs-emphasis-color inherited that ink: plain .table text and header cells, tooltips (dark text on dark background), nav-tabs and nav-underline active links, and list-group hover states. Point it at $wg-text, next to the other body colour overrides, instead of patching .table per page. Verified in the sow-nodebb dev stack against a seeded wiki namespace: the manage table, topics, categories, notifications and account pages all render correctly. Also refresh AGENTS.md "How To Test" for the current `make dev*` loop and state that a theme change can always be checked on a live local forum. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
943 B
JavaScript
24 lines
943 B
JavaScript
// Westgate repaints Bootstrap's LIGHT colour mode dark, so every Bootstrap
|
|
// variable that defaults to a near-black ink must be re-pointed at a light
|
|
// token. Missing one is invisible until some component chains to it — that is
|
|
// how /wiki/manage ended up with near-black table text on a near-black page.
|
|
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const overrides = fs.readFileSync(
|
|
path.join(__dirname, "..", "scss", "overrides.scss"),
|
|
"utf8"
|
|
);
|
|
|
|
// Bootstrap's defaults for these are $black / $body-color-ish inks.
|
|
["$body-color", "$body-bg", "$body-emphasis-color"].forEach(variable => {
|
|
const declaration = new RegExp(`\\${variable}:\\s*([^;]+);`).exec(overrides);
|
|
assert(declaration, `${variable} must be overridden for the dark repaint`);
|
|
assert.match(
|
|
declaration[1],
|
|
/\$wg-/,
|
|
`${variable} must resolve to a Westgate palette token, got: ${declaration[1].trim()}`
|
|
);
|
|
});
|