From 1b98de066063b8fc8ac991ad196a8efab2231557 Mon Sep 17 00:00:00 2001
From: "Tommy D. Rossi"
Date: Sat, 21 Feb 2026 11:09:22 +0100
Subject: [PATCH] website: add lineHeight prop to CodeBlock, use relative
values
Default 1.85 (~22px at 12px font), reduced to 1.5 for ASCII diagram.
Updated editorial-prism.css base to match.
---
website/src/components/markdown.tsx | 4 ++--
website/src/routes/_index.tsx | 2 +-
website/src/styles/editorial-prism.css | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/website/src/components/markdown.tsx b/website/src/components/markdown.tsx
index b13f9a8..b993f51 100644
--- a/website/src/components/markdown.tsx
+++ b/website/src/components/markdown.tsx
@@ -348,7 +348,7 @@ export function Li({ children }: { children: React.ReactNode }) {
Code block with Prism syntax highlighting and line numbers
========================================================================= */
-export function CodeBlock({ children, lang = "jsx" }: { children: string; lang?: string }) {
+export function CodeBlock({ children, lang = "jsx", lineHeight = "1.85" }: { children: string; lang?: string; lineHeight?: string }) {
const codeRef = useRef(null);
const lines = children.split("\n");
@@ -377,7 +377,7 @@ export function CodeBlock({ children, lang = "jsx" }: { children: string; lang?:
fontFamily: "var(--font-code)",
fontSize: "12px",
fontWeight: 400,
- lineHeight: "24px",
+ lineHeight,
letterSpacing: "normal",
color: "var(--text-primary)",
tabSize: 2,
diff --git a/website/src/routes/_index.tsx b/website/src/routes/_index.tsx
index 8cdb98e..049c8f2 100644
--- a/website/src/routes/_index.tsx
+++ b/website/src/routes/_index.tsx
@@ -150,7 +150,7 @@ export default function IndexPage() {
no flags, no special setup.
- {dedent`
+ {dedent`
┌─────────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ BROWSER │ │ LOCALHOST │ │ CLIENT │
│ │ │ │ │ │
diff --git a/website/src/styles/editorial-prism.css b/website/src/styles/editorial-prism.css
index a7df4fe..2b1c695 100644
--- a/website/src/styles/editorial-prism.css
+++ b/website/src/styles/editorial-prism.css
@@ -22,7 +22,7 @@ pre[class*="language-"] {
font-size: 12px;
font-weight: 500;
letter-spacing: 0.02em;
- line-height: 24px;
+ line-height: 1.85;
text-align: left;
white-space: pre;
word-spacing: normal;