Skip to content

Commit 8fbfef2

Browse files
committed
fix(hub): increase body font-size from 14px to 16px for GitHub-grade readability
1 parent e735312 commit 8fbfef2

1 file changed

Lines changed: 28 additions & 18 deletions

File tree

public/styles/global.css

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,18 @@
55
Layout-only rules to wire up the two-column shell.
66
========================================================== */
77

8-
/* -- Body defaults (GitHub / Primer baseline) -------------- */
8+
/* -- Body font -------------------------------------------- */
9+
/* Primer does not set font-family on body; without this, nav,
10+
header, footer and anything outside .markdown-body falls back
11+
to the browser default (Times New Roman on most platforms).
12+
This matches the stack used by github-markdown.css. */
913
body {
1014
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
1115
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
12-
font-size: 0.875rem;
16+
font-size: 16px;
1317
line-height: 1.5;
14-
color: var(--fgColor-default, var(--color-fg-default));
15-
background-color: var(--bgColor-default, var(--color-canvas-default));
16-
-webkit-font-smoothing: antialiased;
17-
}
18-
19-
/* -- Links -------------------------------------------------- */
20-
a {
21-
color: var(--fgColor-accent, var(--color-accent-fg));
22-
text-decoration: none;
23-
}
24-
25-
a:hover {
26-
text-decoration: underline;
18+
color: var(--fgColor-default, var(--color-fg-default, #1f2328));
19+
background-color: var(--bgColor-default, var(--color-canvas-default, #ffffff));
2720
}
2821

2922
/* -- Images / SVG ------------------------------------------ */
@@ -33,6 +26,14 @@ svg {
3326
max-width: 100%;
3427
}
3528

29+
/* -- Fix github-markdown.css fgColor-accent override ------ */
30+
/* github-markdown.css sets --fgColor-accent: Highlight (a CSS
31+
system color) inside .markdown-body, which overrides primer.css's
32+
correct value of #0969da. Re-pin it to the primer variable. */
33+
.markdown-body {
34+
--fgColor-accent: var(--color-accent-fg, #0969da);
35+
}
36+
3637
/* -- Header: sticky + z-index above sidebar --------------- */
3738
/* Primer .Header has z-index:32; sidebar is z-index:50; */
3839
/* so we lift the header to 100. */
@@ -184,11 +185,12 @@ svg {
184185
min-height: calc(100vh - 52px);
185186
}
186187

187-
/* -- Main content markdown-body provides the typography -- */
188+
/* -- Main content markdown-body provides the typography -- */
188189
.main-content {
189190
flex: 1;
190191
padding: 32px 56px 64px;
191-
max-width: 1290px;
192+
max-width: 900px;
193+
width: 100%;
192194
}
193195

194196
/* github-markdown.css sets background-color on .markdown-body;
@@ -197,10 +199,12 @@ svg {
197199
background-color: transparent !important;
198200
}
199201

200-
/* Ensure tables fill available width inside our container. */
202+
/* Tables: GitHub-faithful responsive overflow */
201203
.main-content .markdown-body table {
204+
display: block;
202205
width: max-content;
203206
max-width: 100%;
207+
overflow: auto;
204208
}
205209

206210
/* -- Get-involved bar -------------------------------------- */
@@ -260,6 +264,7 @@ svg {
260264
.main-content {
261265
padding: 28px 36px 56px;
262266
max-width: 100%;
267+
width: 100%;
263268
}
264269

265270
.get-involved {
@@ -314,6 +319,11 @@ svg {
314319
padding: 20px 18px 48px;
315320
}
316321

322+
/* Tables scroll horizontally on mobile */
323+
.main-content .markdown-body table {
324+
font-size: 0.8125rem;
325+
}
326+
317327
.get-involved {
318328
padding: 11px 18px;
319329
}

0 commit comments

Comments
 (0)