Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 92 additions & 5 deletions .claude/skills/icp-brand-design/SKILL.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
22 changes: 22 additions & 0 deletions .claude/skills/icp-brand-design/assets/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 123 additions & 23 deletions .claude/skills/icp-brand-voice/SKILL.md

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,35 @@ export default defineConfig({
ThemeSelect: "./src/components/ThemeSelect.astro",
},
head: [
// Favicon set for ICP brand guide v2.26 (see .claude/skills/icp-brand-design SKILL.md §6.5).
// Starlight emits the primary SVG (rel="shortcut icon") from the top-level favicon option;
// these entries add the .ico fallback, PNG rasters, Apple touch icon, and Safari mask.
{
tag: "link",
attrs: { rel: "alternate icon", type: "image/x-icon", href: "/favicon.ico" },
},
{
tag: "link",
attrs: { rel: "icon", type: "image/png", sizes: "32x32", href: "/favicon-32.png" },
},
{
tag: "link",
attrs: { rel: "icon", type: "image/png", sizes: "16x16", href: "/favicon-16.png" },
},
{
tag: "link",
attrs: { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
},
{
tag: "link",
attrs: { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#a8482b" },
},
// Browser chrome tint. Matches the light parchment default; the theme scripts
// update this to the dark bark value when the user opts into dark.
{
tag: "meta",
attrs: { name: "theme-color", content: "#faf9f5" },
},
{
tag: "link",
attrs: {
Expand Down Expand Up @@ -116,7 +145,6 @@ export default defineConfig({
"@fontsource/inter/400.css",
"@fontsource/inter/500.css",
"@fontsource/inter/600.css",
"@fontsource/inter/700.css",
"@fontsource/newsreader/400.css",
"@fontsource/newsreader/400-italic.css",
"@fontsource/newsreader/500.css",
Expand Down
Binary file added public/apple-touch-icon-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/favicon.ico
Binary file not shown.
25 changes: 22 additions & 3 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/components/ThemeProvider.astro
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
---

{/* Inlined to avoid FOUC. Defaults to system prefers-color-scheme; overridden by stored user preference. */}
{/* Inlined to avoid FOUC. Light editorial parchment is the deliberate default; dark applies
only when the user has explicitly opted in. Never auto-switch on prefers-color-scheme
(ICP brand guide: light default, dark opt-in only). */}
<script is:inline>
window.StarlightThemeProvider = (() => {
const storedTheme =
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
const prefersTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
const theme = storedTheme || prefersTheme;
document.documentElement.dataset.theme = theme === 'dark' ? 'dark' : 'light';
const theme = storedTheme === 'dark' ? 'dark' : 'light';
document.documentElement.dataset.theme = theme;
const themeColor = document.querySelector('meta[name="theme-color"]');
if (themeColor) themeColor.setAttribute('content', theme === 'dark' ? '#14110d' : '#faf9f5');
return {
updatePickers(theme = storedTheme || 'auto') {
document.querySelectorAll('starlight-theme-select').forEach((picker) => {
Expand Down
7 changes: 5 additions & 2 deletions src/components/ThemeSelect.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@

const storageKey = 'starlight-theme';

// Light is the deliberate default; dark applies only on an explicit stored choice.
// Never fall back to prefers-color-scheme (ICP brand guide: light default, dark opt-in only).
const loadTheme = (): Theme => {
const stored = typeof localStorage !== 'undefined' ? localStorage.getItem(storageKey) : null;
if (stored === 'dark' || stored === 'light') return stored;
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
return stored === 'dark' ? 'dark' : 'light';
};

function storeTheme(theme: Theme): void {
Expand All @@ -38,6 +39,8 @@
function applyTheme(theme: Theme): void {
document.documentElement.dataset.theme = theme;
storeTheme(theme);
const themeColor = document.querySelector('meta[name="theme-color"]');
if (themeColor) themeColor.setAttribute('content', theme === 'dark' ? '#14110d' : '#faf9f5');
document.querySelectorAll('starlight-theme-select button').forEach((btn) => {
btn.setAttribute(
'aria-label',
Expand Down
15 changes: 12 additions & 3 deletions src/styles/custom.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*
* ICP Developer Docs Custom Theme
* ICP Developer Docs: Custom Theme
*
* Brand: ICP / DFINITY v2.2 (2026-05-08)
* Brand: ICP / DFINITY brand guide v2.27 (design skill v2.7)
* Light editorial parchment is the default theme.
* Dark mode is opt-in via data-theme="dark" on <html> never auto from prefers-color-scheme.
* Dark mode is opt-in via data-theme="dark" on <html>: never auto from prefers-color-scheme.
* Three-face type system: Newsreader (editorial), Inter (UI chrome), JetBrains Mono (technical).
* Inter ships 400/500/600 only; bold prose maps to 600 (no 700+ in the system).
* One primary accent: rust #a8482b.
*/

Expand Down Expand Up @@ -206,6 +207,14 @@ code, pre, kbd, samp,
font-family: var(--icp-mono);
}

/* Inter tops out at 600 in the three-face system (no 700 face is loaded).
Map bold prose to 600 so emphasized text renders a real loaded weight. */
strong, b,
.sl-markdown-content strong,
.sl-markdown-content b {
font-weight: 600;
}

/* ── Light mode — Starlight token overrides ─────────────────── */

:root[data-theme='light'] {
Expand Down
Loading