Tokenise the three literal grouping hairlines; add the one-rule-token probe
Some checks failed
PR Build Check / build (pull_request) Failing after 3m19s

scripts/checks/rule-token.mjs fails on a 1px single-side border or column-rule
with a literal colour in custom.scss (VN speaker card excepted). It failed on
lines 316, 372 and 408 before this change; they now read --gamecult-rule.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Void 2026-11-09 11:28:57 +00:00
commit cb51b8d62a
2 changed files with 21 additions and 3 deletions

View file

@ -0,0 +1,18 @@
// Target invariant site-masthead:one-rule-token: no literal hairline colour in custom.scss;
// every grouping rule (1px single-side border, column-rule) reads --gamecult-rule.
// The VN speaker card is game UI, not grouping, and keeps its own edge colours.
import { readFileSync } from "node:fs"
const path = process.argv[2] ?? "site/quartz/styles/custom.scss"
const hairline = /^\s*(border-(top|bottom|left|right)|column-rule):\s*1px solid\s+(rgba?\(|#)/
let selector = ""
const bad = []
readFileSync(path, "utf8").split("\n").forEach((line, i) => {
if (line.trimEnd().endsWith("{")) selector = line
if (hairline.test(line) && !selector.includes("sai-speaker")) bad.push(`${path}:${i + 1}: ${line.trim()}`)
})
if (bad.length) {
console.error(`literal hairlines (use var(--gamecult-rule)):\n${bad.join("\n")}`)
process.exit(1)
}
console.log("one-rule-token: ok")

View file

@ -313,7 +313,7 @@ body[data-slug="Blog/witness-authoritative-networking"] {
.ritual-paper-results-strip span {
padding: 0.85rem 0.65rem;
color: rgba(232, 237, 244, 0.88);
border-right: 1px solid rgba(255, 178, 30, 0.2);
border-right: 1px solid var(--gamecult-rule);
font-family: "IBM Plex Mono", Consolas, monospace;
font-size: 0.76rem;
line-height: 1.45;
@ -369,7 +369,7 @@ body[data-slug="Blog/witness-authoritative-networking"] {
gap: 1rem;
margin: 2rem 0 0;
padding-top: 0.95rem;
border-top: 1px solid rgba(174, 189, 210, 0.2);
border-top: 1px solid var(--gamecult-rule);
column-span: all;
}
@ -405,7 +405,7 @@ body[data-slug="Blog/witness-authoritative-networking"] {
.ritual-paper-page {
column-count: 2;
column-gap: 2.6rem;
column-rule: 1px solid rgba(49, 88, 255, 0.2);
column-rule: 1px solid var(--gamecult-rule);
}
.ritual-paper-page::before,