Tokenise the three literal grouping hairlines; one-rule-token probe (#18)
Some checks failed
Deploy Quartz / build (push) Failing after 1s
Deploy Quartz / deploy-1 (push) Has been skipped
Deploy Quartz / deploy (push) Failing after 0s

This commit is contained in:
Void 2026-11-09 16:01:38 +00:00
commit 875fb8ad09
3 changed files with 24 additions and 3 deletions

View file

@ -16,11 +16,14 @@ jobs:
steps:
- name: Checkout site repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout shared Quartz engine
uses: actions/checkout@v4
with:
repository: GameCult/GameCult-Quartz
ref: main
path: GameCult-Quartz
- name: Setup Node

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,