Skip to content

infra: sync site to brand guidelines v2.22#293

Closed
raymondk wants to merge 1 commit into
mainfrom
infra/brand-v2.22-sync
Closed

infra: sync site to brand guidelines v2.22#293
raymondk wants to merge 1 commit into
mainfrom
infra/brand-v2.22-sync

Conversation

@raymondk

Copy link
Copy Markdown
Collaborator

Summary

Brings the docs site in line with the ICP/DFINITY brand guidelines v2.22 (2026-06-15). The CSS was stamped v2.2 (2026-05-08) and a few things had drifted or were never finished.

Correctness

  • Dark theme no longer auto-switches on system preference. Light is now the default; dark applies only via an explicit stored user choice. Fixed in both ThemeProvider.astro (FOUC-guard inline script) and ThemeSelect.astro (loadTheme), which both previously fell back to prefers-color-scheme: dark. The guidelines are explicit: light default, dark opt-in only, never auto.
  • theme-color meta tags added per the brand head template: #faf9f5 (light) and #14110d (dark).

Token / config polish

  • Dark CTA-bar inverse now stays near-black #1a1a1a (was #ffffff), with white inverse text, matching "CTA bar always near-black in both themes." (No component consumes these tokens yet, so no visual change today; this makes the pair correct for the first CTA bar that lands.)
  • Dark sunk background corrected #1b1812 -> #1f1b14 (sunk bark).
  • Dropped the off-system Inter 700 face (three-face system is Inter 400/500/600); bold/strong now map to 600 so emphasized prose renders a real loaded weight.
  • Bumped the CSS brand stamp to v2.22.

Still needs the design source (not in this PR)

The favicon is currently a base64 PNG wrapped in an SVG. The guidelines require a gradient-infinity vector on a transparent canvas plus raster sizes (16/32/48/192/512), an apple-touch-icon (+ dark variant), and a safari-pinned-tab.svg mask icon. These need the actual brand vector asset before the corresponding <link> head tags can be wired up without 404s.

Verified

  • npm run build passes; both theme-color tags confirmed in built HTML.
  • No remaining inter/700 reference.

- Theme: default to light; never auto-switch from prefers-color-scheme.
  Dark applies only via an explicit stored preference (ThemeProvider + ThemeSelect).
- Tokens: dark CTA-bar inverse stays near-black #1a1a1a (was #ffffff) with
  white inverse text; dark sunk background corrected to #1f1b14.
- Head: add the two brand theme-color meta tags (parchment / deep bark).
- Type: drop the off-system Inter 700 face; map bold/strong to 600.
- Bump CSS brand stamp to v2.22 (2026-06-15).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@raymondk
raymondk requested a review from a team as a code owner June 15, 2026 01:36
@marc0olo

Copy link
Copy Markdown
Member

@raymondk I added the skills to the repo back then:

should we update those accordingly? I think at least the brand voice should stay to be used when docs are added/updated.

@marc0olo

Copy link
Copy Markdown
Member

Superseded by #316, which ships the favicon set this PR deferred and applies the theme fixes against the latest brand skill (design v2.7 / brand guide v2.26+).

Note: two dark-theme token edits proposed here (--icp-bg-cta-inverse -> #1a1a1a, --icp-bg-sunk -> #1f1b14) were intentionally dropped in #316 because they contradict the canonical tokens.css, which keeps #ffffff and #1b1812 respectively. Closing in favor of #316.

@marc0olo marc0olo closed this Jul 17, 2026
marc0olo added a commit that referenced this pull request Jul 17, 2026
## Summary
Supersedes #293. Brings the docs site in line with the ICP/DFINITY brand
guide favicon spec (design skill v2.7 / brand guide v2.26+, verified
live at `v2.27`) and finishes the theme correctness work #293 started,
dropping the two token edits in #293 that contradicted the canonical
`tokens.css`.

### Favicon (the piece #293 deferred)
- Ship the full brand favicon set: `favicon.svg` (gradient-infinity
vector on a transparent canvas), multi-size `favicon.ico`, PNG rasters
(16/32/48/192/512), Apple touch icon (light + dark), and a
`safari-pinned-tab.svg` mask. Replaces the old base64-PNG-wrapped-in-SVG
placeholder.
- Wire the head tags per §6.5: `.ico` alternate, PNG rasters,
`apple-touch-icon`, and `mask-icon` with rust `#a8482b`. Starlight
continues to emit the primary SVG.

### Theme correctness
- Stop auto-switching on `prefers-color-scheme` in both
`ThemeProvider.astro` (FOUC guard) and `ThemeSelect.astro`. Light is the
deliberate default; dark applies only on an explicit stored choice.
- Add a `theme-color` meta (`#faf9f5`) and sync it to the dark bark
value (`#14110d`) when the user opts into dark, so the browser chrome
matches the applied theme rather than the OS preference.

### Type system
- Drop the off-system Inter 700 face (the system is Inter 400/500/600)
and map bold prose to Inter 600 so emphasized text renders a real loaded
weight.

### Intentionally NOT carried over from #293
Two dark-theme token edits in #293 contradict the canonical `tokens.css`
(the skill's declared source of truth), and the site already matches the
canonical values, so they are dropped:
- `--icp-bg-cta-inverse` stays `#ffffff` in dark (#293 set `#1a1a1a`)
- `--icp-bg-sunk` stays `#1b1812` in dark (#293 set `#1f1b14`)

No component consumes `--icp-bg-cta-inverse` today, so there is no
visual impact either way.

## Verified
- `npm run build` passes.
- Built HTML contains all favicon link tags and the `theme-color` meta.
- `public/favicon.svg` is the vector mark (no base64); no Inter 700 in
the bundle.
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.

2 participants