IDIP sign-in page: the kit's ACCENT never applies — a self-referencing --oc-accent: var(--oc-accent, …) rule in the page's own style invalidates the compiled token, so every community's sign-in wears Mātou sage #1715

Closed
opened 2026-09-22 03:57:09 +00:00 by ben · 2 comments
Owner

What Ben saw (Whakatōhea Demo, after the gateway took release cef28743 which carries #1705's fix)

id.<apex>/login shows the greeting and the name from the kit, but the logo tile and the Sign in button are Mātou sage (#619793), not the kit's accent #4f4f4f. Screenshot in the session.

Cause (internal/idp/brand.go:252 on main)

The compiled tokens block rightly sets :root { --oc-accent: #4f4f4f; … } (line 11 of the served page). Immediately after it the page template emits:

:root { --oc-accent: var(--oc-accent, #619793); }

A custom property that references itself is a cycle; per CSS Variables the declaration is invalid at computed-value time and the property becomes guaranteed-invalid — it does NOT keep the earlier value. Every consumer (.logo { background: var(--oc-accent, #619793) }, button) then takes its fallback, sage. So the accent compiled from the kit is thrown away on every community, Kanidm or IDIP — #1705's late-bind made the name/greeting/secondary reach the page, but the accent never could.

Fix

  • Delete line 252 (the intent — "default to sage when the kit sets nothing" — is already served by the var(--oc-accent, #619793) fallbacks on each consumer, and by compileBrandTokens' matou-preset fallback).
  • Audit the other idss-served pages that carry a tokens block for the same pattern (grep -rn 'var(--oc-' internal/ | grep ':root').
  • Test: render the page with a kit whose accent is #4f4f4f and assert the served CSS contains NO --oc-accent: var(--oc-accent rule; a browser-level check in the brand-reach drive (#1277) reads the computed background of the sign-in button on id.<apex> — the only check that catches a cascade bug.

Found on the hand re-founding of Whakatōhea Demo 2026-09-21/22, release cef28743. Relates to #1705.

## What Ben saw (Whakatōhea Demo, after the gateway took release `cef28743` which carries #1705's fix) `id.<apex>/login` shows the greeting and the name from the kit, but the logo tile and the Sign in button are Mātou sage (`#619793`), not the kit's accent `#4f4f4f`. Screenshot in the session. ## Cause (`internal/idp/brand.go:252` on main) The compiled tokens block rightly sets `:root { --oc-accent: #4f4f4f; … }` (line 11 of the served page). Immediately after it the page template emits: ```css :root { --oc-accent: var(--oc-accent, #619793); } ``` A custom property that references itself is a **cycle**; per CSS Variables the declaration is invalid at computed-value time and the property becomes guaranteed-invalid — it does NOT keep the earlier value. Every consumer (`.logo { background: var(--oc-accent, #619793) }`, `button`) then takes its fallback, sage. So the accent compiled from the kit is thrown away on every community, Kanidm or IDIP — #1705's late-bind made the name/greeting/secondary reach the page, but the accent never could. ## Fix - Delete line 252 (the intent — "default to sage when the kit sets nothing" — is already served by the `var(--oc-accent, #619793)` fallbacks on each consumer, and by `compileBrandTokens`' matou-preset fallback). - Audit the other idss-served pages that carry a tokens block for the same pattern (`grep -rn 'var(--oc-' internal/ | grep ':root'`). - Test: render the page with a kit whose accent is `#4f4f4f` and assert the served CSS contains NO `--oc-accent: var(--oc-accent` rule; a browser-level check in the brand-reach drive (#1277) reads the computed background of the sign-in button on `id.<apex>` — the only check that catches a cascade bug. Found on the hand re-founding of Whakatōhea Demo 2026-09-21/22, release `cef28743`. Relates to #1705.

swarm-claim host=elitebook-distributed-server-03 run=29782
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=29782 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1715 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1715,
  "status": "success",
  "commits": [
    "b4ab89024437f7cddbea8b902d79381f77325d29"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "internal/idp/appdoorpage.go",
    "internal/idp/brand.go",
    "internal/idp/brand_accent_cascade_seam_test.go",
    "internal/idp/deviceapprove.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Delete the self-referencing `:root { --oc-accent: var(--oc-accent, #619793); }` line (issue: brand.go:252 on main)": "Deleted from all four render sites in the same union diff — internal/idp/brand.go (signInPage.render + renderSignedOut), internal/idp/deviceapprove.go (devicePage.render), internal/idp/appdoorpage.go (appDoorTemplate). Verified: `grep -rn ':root { --oc-accent: var(--oc-accent' internal/idp/` returns nothing.",
    "Audit the other idss-served pages that carry a tokens block for the same pattern": "Ran `grep -rn 'var(--oc-' internal/ | grep ':root'`: the only self-referencing occurrences were the four idp brand pages above (the brandkit golden snapshots carry real hex accents, not self-references). All four fixed.",
    "Test: render the page with a kit whose accent is #4f4f4f and assert the served CSS contains NO `--oc-accent: var(--oc-accent` rule": "internal/idp/brand_accent_cascade_seam_test.go TestBrandPages_NoSelfReferencingAccentCycle renders all four pages (sign-in, app-door, device, signed-out) with accent #4f4f4f and asserts the served CSS carries #4f4f4f AND contains no `--oc-accent: var(--oc-accent` rule. Red before the fix (all four pages lost the accent / kept the cycle), green after.",
    "Browser-level check in the brand-reach drive (#1277) reads the computed background of the sign-in button — the only check that catches a cascade bug": "OWED to the live drive #1277: a computed-style read needs a running founded community (out of scope for a seam fix). Recorded in GOTCHAS #310 and the STATUS entry — a text-level 'hex in CSS' check cannot catch this cascade cycle, only a computed-style read can."
  },
  "summary": "Deleted the self-referencing `--oc-accent: var(--oc-accent, …)` cascade cycle from every idss-served brand page so the kit's compiled accent applies, with a seam test across all four pages.",
  "reason": "The self-referencing custom property made --oc-accent guaranteed-invalid at computed-value time, discarding the kit's compiled accent so every community's sign-in wore Mātou sage; deleting it lets the compiled accent apply while each consumer's own var(--oc-accent, #619793) fallback and compileBrandTokens' matou preset still supply the sage default.",
  "blockers": []
}
**close-report** for #1715 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1715, "status": "success", "commits": [ "b4ab89024437f7cddbea8b902d79381f77325d29" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "internal/idp/appdoorpage.go", "internal/idp/brand.go", "internal/idp/brand_accent_cascade_seam_test.go", "internal/idp/deviceapprove.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build ./...", "exit_code": 0 } ], "criteria": { "Delete the self-referencing `:root { --oc-accent: var(--oc-accent, #619793); }` line (issue: brand.go:252 on main)": "Deleted from all four render sites in the same union diff — internal/idp/brand.go (signInPage.render + renderSignedOut), internal/idp/deviceapprove.go (devicePage.render), internal/idp/appdoorpage.go (appDoorTemplate). Verified: `grep -rn ':root { --oc-accent: var(--oc-accent' internal/idp/` returns nothing.", "Audit the other idss-served pages that carry a tokens block for the same pattern": "Ran `grep -rn 'var(--oc-' internal/ | grep ':root'`: the only self-referencing occurrences were the four idp brand pages above (the brandkit golden snapshots carry real hex accents, not self-references). All four fixed.", "Test: render the page with a kit whose accent is #4f4f4f and assert the served CSS contains NO `--oc-accent: var(--oc-accent` rule": "internal/idp/brand_accent_cascade_seam_test.go TestBrandPages_NoSelfReferencingAccentCycle renders all four pages (sign-in, app-door, device, signed-out) with accent #4f4f4f and asserts the served CSS carries #4f4f4f AND contains no `--oc-accent: var(--oc-accent` rule. Red before the fix (all four pages lost the accent / kept the cycle), green after.", "Browser-level check in the brand-reach drive (#1277) reads the computed background of the sign-in button — the only check that catches a cascade bug": "OWED to the live drive #1277: a computed-style read needs a running founded community (out of scope for a seam fix). Recorded in GOTCHAS #310 and the STATUS entry — a text-level 'hex in CSS' check cannot catch this cascade cycle, only a computed-style read can." }, "summary": "Deleted the self-referencing `--oc-accent: var(--oc-accent, …)` cascade cycle from every idss-served brand page so the kit's compiled accent applies, with a seam test across all four pages.", "reason": "The self-referencing custom property made --oc-accent guaranteed-invalid at computed-value time, discarding the kit's compiled accent so every community's sign-in wore Mātou sage; deleting it lets the compiled accent apply while each consumer's own var(--oc-accent, #619793) fallback and compileBrandTokens' matou preset still supply the sage default.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1715
No description provided.