Skip to content

Commit f2c12fa

Browse files
jack-arturoclaudeCopilot
authored
fix(theme): post typography hierarchy & spacing cleanup (#7)
* fix(theme): post typography hierarchy & spacing cleanup Restore reader hierarchy inside .post-body without breaking the newspaper aesthetic surfaced on /introducing-autovault/: - Split the merged .post-body h2/h3 rule. H2 stays as the editorial kicker (now 13px mono, rule above, --bleed); H3 becomes a Fraunces 600 serif subhead at 1.35em with no border so the two are visibly distinct. H4 added at 1.1em for tertiary breaks. - Tighten paragraph and heading-adjacent rhythm; add h2+h3 sibling rule so a subhead can immediately follow a section kicker without excess gap. - Scope the negative-margin figure bleed to >=920px so figures stop overhanging the prose column on phones. - Add post-body figcaption rule matching the mono/uppercase system. - Bump inline code from 0.85em/1px-padding to 0.92em/2px so tokens sit on the body baseline instead of shrinking. - Add post-body pre margin so code blocks have consistent vertical spacing across Gutenberg wrappers. - Define --ink-soft / --ink-mute / --rule fallbacks in style.css so blockquote color is guaranteed even if custom.css loads out of order; soften the blockquote left bar from --bleed to --rule to stop it competing with link-hover. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(theme): add dark-mode fallbacks for newspaper tokens Agent-Logs-Url: https://github.com/verygoodplugins/minimalcode/sessions/7e77b415-8b8a-4751-85c9-f768e6f49e72 Co-authored-by: jack-arturo <13076544+jack-arturo@users.noreply.github.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jack-arturo <13076544+jack-arturo@users.noreply.github.com>
1 parent 5553fa9 commit f2c12fa

2 files changed

Lines changed: 87 additions & 9 deletions

File tree

assets/css/custom.css

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ pre {
477477
font-family: "JetBrains Mono", monospace;
478478
}
479479
code {
480-
padding: 1px 6px;
481-
font-size: 0.85em;
480+
padding: 2px 6px;
481+
font-size: 0.92em;
482482
}
483483
pre {
484484
padding: var(--spacing-md);
@@ -660,10 +660,76 @@ pre code {
660660
.aj-banner .robot { font-size: 22px; line-height: 1; }
661661
.aj-banner strong { display: block; color: var(--hot); margin-bottom: 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
662662
.post-body { font-family: "Fraunces", serif; font-size: 19px; line-height: 1.65; color: var(--ink); max-width: 64ch; }
663-
.post-body p { margin: 0 0 1.2em; text-wrap: pretty; }
664-
.post-body h2, .post-body h3 { font-family: "JetBrains Mono", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--bleed); margin: 2em 0 0.8em; padding-top: 1em; border-top: 1px solid var(--rule); font-weight: 700; }
665-
.post-body figure { margin: 2.2em -40px; font-family: "JetBrains Mono", monospace; }
663+
.post-body p { margin: 0 0 1.1em; text-wrap: pretty; }
664+
665+
/* H2 — editorial section break: kicker label + rule above. */
666+
.post-body h2 {
667+
font-family: "JetBrains Mono", monospace;
668+
font-size: 13px;
669+
text-transform: uppercase;
670+
letter-spacing: 0.14em;
671+
color: var(--bleed);
672+
font-weight: 700;
673+
margin: 3em 0 0.6em;
674+
padding-top: 1.1em;
675+
border-top: 1px solid var(--rule);
676+
}
677+
678+
/* H3 — serif subhead. No border, sentence case, comfortably larger than body. */
679+
.post-body h3 {
680+
font-family: "Fraunces", serif;
681+
font-size: 1.35em;
682+
font-weight: 600;
683+
line-height: 1.25;
684+
letter-spacing: -0.005em;
685+
color: var(--ink);
686+
margin: 1.8em 0 0.5em;
687+
text-wrap: balance;
688+
}
689+
690+
/* H4 — tertiary subhead, slightly smaller than H3. */
691+
.post-body h4 {
692+
font-family: "Fraunces", serif;
693+
font-size: 1.1em;
694+
font-weight: 600;
695+
line-height: 1.3;
696+
color: var(--ink);
697+
margin: 1.4em 0 0.4em;
698+
}
699+
700+
/* Collapse the gap when H3 immediately follows H2 so the kicker
701+
stays visually attached to its subhead. */
702+
.post-body h2 + h3 { margin-top: 0.8em; }
703+
704+
/* Lists — smaller indent + comfortable item rhythm at 19px serif body. */
705+
.post-body ul,
706+
.post-body ol { margin: 0 0 1.2em 1.4em; padding: 0; }
707+
.post-body li { margin-bottom: 0.4em; }
708+
.post-body li > ul,
709+
.post-body li > ol { margin-top: 0.4em; margin-bottom: 0.4em; }
710+
711+
/* Code blocks — consistent vertical spacing regardless of Gutenberg wrapper. */
712+
.post-body pre { margin: 1.6em 0; }
713+
714+
/* Figure bleed only when side rails are present (≥920px). Below that, keep
715+
figures inside the prose column so they don't overhang the page padding. */
716+
.post-body figure { margin: 1.8em 0; font-family: "JetBrains Mono", monospace; }
717+
@media (min-width: 920px) {
718+
.post-body figure { margin: 2.2em -40px; }
719+
}
666720
.post-body figure img, .post-body p > img, .entry-featured-image img { display: block; max-width: 100%; width: 100%; height: auto; border: 1.5px solid var(--rule); border-radius: 0; background: var(--paper-dark); }
721+
722+
/* Figcaption — match the editorial mono/uppercase system. */
723+
.post-body figcaption {
724+
font-family: "JetBrains Mono", monospace;
725+
font-size: 12px;
726+
color: var(--ink-mute);
727+
letter-spacing: 0.06em;
728+
text-transform: uppercase;
729+
text-align: left;
730+
margin-top: 0.6em;
731+
line-height: 1.4;
732+
}
667733
.filed-under { margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--rule); }
668734
.filed-label { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
669735
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }

style.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ Tags: blog, minimal, dark-mode, code, technical
110110
--fg-primary: var(--text-primary);
111111
--fg-secondary: var(--text-secondary);
112112
--fg-tertiary: var(--text-tertiary);
113+
114+
/* Newspaper-palette fallbacks. The full set lives in custom.css; these
115+
guarantee blockquote / figcaption color even if custom.css fails to
116+
load or rules cascade unexpectedly. */
117+
--ink-soft: #2a2724;
118+
--ink-mute: #6b665c;
119+
--rule: #1a1814;
113120
}
114121

115122
/* Dark mode colors */
@@ -129,6 +136,11 @@ Tags: blog, minimal, dark-mode, code, technical
129136
--code-text: #e6edf3;
130137
--shadow: rgba(0, 0, 0, 0.4);
131138
--shadow-elev: rgba(0, 0, 0, 0.6);
139+
140+
/* Newspaper-palette fallbacks for dark mode */
141+
--ink-soft: #b8aa97;
142+
--ink-mute: #8f8374;
143+
--rule: #4c4339;
132144
}
133145

134146
/* Base styles */
@@ -213,10 +225,11 @@ pre code {
213225
padding: 0;
214226
}
215227

216-
/* Blockquotes — match .post-body p rhythm: no top margin, 1.2em bottom. */
228+
/* Blockquotes — match .post-body p rhythm: no top margin, 1.2em bottom.
229+
Left bar uses --rule (near-black) so it doesn't fight link-hover --bleed. */
217230
blockquote {
218-
border-left: 3px solid var(--bleed);
219-
padding: 0 0 0 1em;
231+
border-left: 4px solid var(--rule);
232+
padding: 0 0 0 1.1em;
220233
margin: 0 0 1.2em;
221234
color: var(--ink-soft);
222235
font-style: italic;
@@ -403,4 +416,3 @@ h2[id], h3[id], h4[id] {
403416
.wp-block-list strong {
404417
color: var(--text-primary);
405418
}
406-

0 commit comments

Comments
 (0)