Skip to content

Commit 3e93ab3

Browse files
committed
docs(site): switch to Roboto Flex and align light-theme prose colors
After scraping docs.docker.com's stylesheet, two of our font/color choices turned out to be subtly off the mark: 1. The site\u2019s --font-sans is \"roboto flex\", not \"Roboto\". Roboto Flex is the variable-axis superset Docker self-hosts at /assets/fonts/RobotoFlex.woff2; on this site we pull it from Google Fonts (which does serve it as opsz 8..144 / wght 100..900). Mono stays as Roboto Mono \u2014 docs.docker.com uses the same file, they just alias it as \"roboto flex mono\" internally. 2. Light-theme body copy was rendered in --gray-900 (\"#1E2129\") \u2014 essentially black. docs.docker.com\u2019s prose body is oklch(37.3% .034 259.733) \u2248 \"#3F4750\" (cool mid-grey), with headings at oklch(21% .034 264.665) \u2248 \"#1F242D\". Lift those two values into the light-theme --text and --text-secondary tokens. Dark-theme tokens already lined up with their inverse prose values (\"#C8CFDA\" \u2248 oklch(87.2%)) so no change there. Heading weights (h1: 800, h2: 700, h3: 600) and the gray scale were already aligned in earlier commits; this just brings the remaining type-system bits in sync.
1 parent 26b09d0 commit 3e93ab3

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

docs/_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<link rel="preconnect" href="https://fonts.googleapis.com">
1818
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
19-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&family=Roboto+Mono:wght@400;500&display=swap" rel="stylesheet">
19+
<link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..900&family=Roboto+Mono:wght@400;500&display=swap" rel="stylesheet">
2020
<link rel="stylesheet" href="{{ '/css/style.css' | relative_url }}">
2121
<link rel="icon" type="image/svg+xml" href="{{ '/assets/docker-mark.svg' | relative_url }}">
2222
</head>

docs/css/style.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@
9494
--header-height: 56px;
9595
--toc-width: 220px;
9696

97-
--font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
98-
--font-mono: 'Roboto Mono', 'SF Mono', Menlo, 'Cascadia Code', monospace;
97+
--font-sans: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
98+
--font-mono: 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
9999
}
100100

101-
/* Light theme override — calibrated to docs.docker.com */
101+
/* Light theme override — calibrated to docs.docker.com.
102+
* Light body text is intentionally a mid-grey (\"#3F4750\"), not pure
103+
* black, to match the prose style on docs.docker.com. */
102104
[data-theme="light"] {
103105
--bg: var(--bg-light);
104106
--bg-sidebar: #F3F4F6;
@@ -107,8 +109,8 @@
107109
--bg-card: #FFFFFF;
108110
--bg-hover: var(--gray-100);
109111

110-
--text: var(--gray-900);
111-
--text-secondary: var(--gray-700);
112+
--text: #1F242D; /* headings / strong copy */
113+
--text-secondary: #3F4750; /* body — docs.docker.com prose body */
112114
--text-muted: var(--gray-500);
113115
--text-sidebar: var(--gray-700);
114116
--text-sidebar-active: var(--gray-900);

0 commit comments

Comments
 (0)