Skip to content

docs: PR #473 review fixes + local DESIGN.md adoption record#474

Merged
cjimti merged 2 commits intomasterfrom
docs/scope-and-design-followup
Apr 27, 2026
Merged

docs: PR #473 review fixes + local DESIGN.md adoption record#474
cjimti merged 2 commits intomasterfrom
docs/scope-and-design-followup

Conversation

@cjimti
Copy link
Copy Markdown
Member

@cjimti cjimti commented Apr 26, 2026

Follow-up to #473. Two commits.

Summary

132e0bf — Address PR #473 review findings

Post-merge code review surfaced six issues. All addressed.

  • Component class-name leakage. Every homepage component class (.hero__*, .section, .section__*, .flagship*, .terminal*, .stack*, .coda*, .ticker*, .dropcap, .outline) now requires .page--home as an ancestor selector. Without scoping, any inner-page markdown using class="terminal" or class="section" would inherit homepage display styling.
  • Footer collision. Renamed .footer (and all __rule, __inner, __col, __label, __text, __links, __mono, __base siblings) to .home-footer. Dropped the dead .page--home + .footer adjacent-sibling selector that never matched in the actual DOM nesting.
  • Overlay z-index. Lowered body::before (grain) and body::after (vignette) from z-index: 100 to z-index: 1 so the rail (z 50) and skiplink (z 200) are no longer darkened by the vignette.
  • :has() fallback. Added @supports not selector(:has(*)) block so headings containing inline code still render with mono+signal on Firefox <121 and Safari <15.4 (less ideal, but readable).
  • setInterval leak under navigation.instant. Wrapped the live UTC clock IIFE with window.__kubefwdClock global guard. Each return to the homepage via instant-nav now reuses the existing handle and refreshes the displayed time without registering a new interval.
  • Mermaid theme. Added Material's --md-mermaid-* CSS variables to the slate scheme block and a .md-typeset .mermaid container restyle. Architecture and MCP integration diagrams now render with the txn2 dark palette.

4a14b8f — Add local DESIGN.md adoption record

Thin local sidecar to canonical txn2/www/DESIGN.md and tokens.json. References upstream as the source of truth for tokens, typography, components, and voice. Records only what is project-specific and the MkDocs Material learnings that do not apply to the upstream Hugo site.

Sections:

  • What is canonical — table mapping every concern (palette, type scale, components, voice, mermaid) to upstream
  • Adoption level — explicit "token alignment" per upstream's downstream contract
  • File map — what each touched file owns
  • Project-specific components — what is used, what is NOT used (with reason), kubefwd-only additions
  • MkDocs Material learnings — 12 numbered, named lessons covering: custom homepage template, Material variable overrides, font: false, scoping discipline, footer rename, technical h3/h4 typography, tabbed-set restyle, Mermaid via CSS vars, setInterval guard, dark-only palette, overlay z-index, what Hugo can do that MkDocs cannot
  • Voice and copy — defers to upstream
  • Updating — workflow for when upstream changes
  • Downstream contract for sister projects — instructions for txeh, mcp-s3, mcp-trino, mcp-datahub, mcp-data-platform to use this file as a template

Files

Path Change
`DESIGN.md` new, 243 lines
`docs/overrides/home.html` footer class rename, clock IIFE guard
`docs/stylesheets/extra.css` scoping, footer rename, z-index, :has fallback, mermaid vars

Test plan

  • `mkdocs build --strict` passes
  • Homepage renders the same as before the scoping changes (no visual regression)
  • Inner pages with markdown that happens to use `class="terminal"` or `class="section"` no longer inherit homepage styling
  • Vignette no longer darkens the rail
  • Live UTC clock keeps ticking after several instant-nav round trips back to homepage; only one interval handle in DevTools timers
  • `/architecture/` Mermaid diagrams render with dark palette (paper text, ink-3 nodes, mute edges)
  • `grep -RE "—|–" docs/ DESIGN.md mkdocs.yml` returns nothing
  • `DESIGN.md` is discoverable at the repo root, alongside README and CLAUDE.md

cjimti added 2 commits April 26, 2026 16:47
Fixes the issues surfaced in the post-merge code review of the txn2
re-skin.

- Scope every homepage component class under .page--home (.hero__*,
  .section, .section__*, .flagship*, .terminal*, .stack*, .coda*,
  .ticker*, .dropcap, .outline). Without scoping, any inner-page
  markdown using class="terminal" or class="section" inherited
  homepage display styling.
- Rename .footer (and __rule, __inner, __col, __label, __text,
  __links, __mono, __base) to .home-footer to remove the global
  collision risk and the dead .page--home + .footer adjacent-sibling
  selector.
- Lower body::before / body::after (grain, vignette) from z-index 100
  to z-index 1 so the rail (z 50) and skiplink (z 200) are no longer
  darkened by the vignette.
- Add @supports not selector(:has(*)) fallback so headings with inline
  code still get mono+signal treatment on Firefox <121 / Safari <15.4.
- Guard the rail/footer UTC-clock IIFE with window.__kubefwdClock so
  Material's navigation.instant rehydration does not register a fresh
  setInterval handle on each navigation.
- Add Mermaid theming via Material's --md-mermaid-* CSS variables
  plus a .md-typeset .mermaid container restyle so the architecture
  diagrams render with the dark palette.
Thin local sidecar to the canonical txn2/www DESIGN.md and tokens.json.
Records what is project-specific without duplicating the upstream
visual identity rules. Captures MkDocs Material learnings that do not
apply to the upstream Hugo site, so the next sister project can adopt
the design system without re-discovering them.

Sections: canonical reference table, adoption level (token alignment),
file map, project-specific components (kubefwd flagship variants,
terminal usage, stack list anchored to docs sections), 12 numbered
MkDocs Material learnings, voice / copy rules deferred to upstream,
update workflow, and a downstream contract for sister projects (txeh,
mcp-s3, mcp-trino, mcp-datahub, mcp-data-platform) that want to reuse
this file as a template.
@cjimti cjimti merged commit e74f6b4 into master Apr 27, 2026
11 checks passed
@cjimti cjimti deleted the docs/scope-and-design-followup branch April 27, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant