Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix(frontend): tighten markdown heading spacing (#9962)

Shahmir Varqhaa10c7594bf26
diff --git a/frontend/src/css/md.css b/frontend/src/css/md.css
index b11a53c045..ec539674fb 100644
--- a/frontend/src/css/md.css
+++ b/frontend/src/css/md.css
@@ -49,6 +49,18 @@
.markdown h6 {
font-weight: inherit;
font-family: var(--heading-font);
+
+ /*
+ Anchor heading spacing to GitHub's markdown rhythm (Primer): a uniform
+ 24px top / 16px bottom margin and 1.25 line-height across every level,
+ letting font-size — not margin — carry the hierarchy. Tailwind Typography's
+ prose defaults scale heading margins per-level up to ~2em (≈48px on h2),
+ which is tuned for long-form articles and reads as too airy in a notebook.
+ Ref: https://github.com/sindresorhus/github-markdown-css
+ */
+ margin-top: 1.5rem;
+ margin-bottom: 1rem;
+ line-height: 1.25;
}
.markdown hr {