- Add not-prose to .code-block-wrapper to opt out of Tailwind Typography
styles (table margins were causing the empty line gaps above/below code)
- Restore font-size: 0.875em on pre and code since not-prose removed the
Typography plugin's size normalization
Co-Authored-By: Claude Sonnet 4.6 <redacted>
overflow-x: visible;
}
+/* Re-apply padding after the reset above, with higher specificity */
+.code-block-wrapper .highlight .lntd:first-child pre {
+ padding: 0.875rem 0;
+}
+
+.code-block-wrapper .highlight .lntd:last-child pre {
+ padding: 0.875rem 1rem;
+}
+
/* === Chroma table layout (lineNumbersInTable = true) === */
.highlight table {
overflow-x: auto;
}
+.code-block-wrapper pre,
+.code-block-wrapper code {
+ font-size: 0.875em;
+}
+
/* === Syntax token colors (dark theme default) === */
.highlight {
{{- if not $hasLang -}}{{- $highlightLang = "text" -}}{{- end -}}
{{- $opts := dict "lineNos" true "lineNumbersInTable" true -}}
-<div class="code-block-wrapper">
+<div class="code-block-wrapper not-prose">
{{- if $hasLang -}}
<div class="code-header" data-lang="{{ $lang }}">
<span class="code-lang-label">{{ $lang }}</span>
</div>
{{- end -}}
<div class="code-body">
- {{ highlight .Inner $highlightLang $opts }}
+{{- highlight .Inner $highlightLang $opts -}}
</div>
</div>