From cd9306bb88980c79dd591ced8fa06e8b7a0dc396 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 24 Aug 2026 01:34:47 -0700 Subject: [PATCH 1/2] fix(react): style verbatim via CSS, not an inline gray code block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The verbatim component hardcoded a gray (#f5f5f5) code-block look, so every consumer got it regardless of page background and could only override it with !important. Move the styling into latex2js.css as a plain, page-coloured default (transparent, no padding/rounding) — matching the original sites — which consumers can override with a normal rule. --- packages/css/latex2js.css | 8 ++++++++ packages/latex2js/latex2js.css | 8 ++++++++ packages/react/src/components/verbatim.tsx | 11 +---------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/css/latex2js.css b/packages/css/latex2js.css index 6fe80441..3ae5f55f 100644 --- a/packages/css/latex2js.css +++ b/packages/css/latex2js.css @@ -151,6 +151,14 @@ h4.theorem-head::after { pre { overflow: auto; } + +/* Verbatim blocks render as plain, page-coloured code — no gray box, padding, + or rounding. Consumers who want a code-block look override this rule. */ +pre.verbatim { + background-color: transparent; + padding: 0; + border-radius: 0; +} /* * Paragraph spacing. A run of blank lines is one \par however long it is, so * the gap belongs to the document rather than to how many times the author hit diff --git a/packages/latex2js/latex2js.css b/packages/latex2js/latex2js.css index 6fe80441..3ae5f55f 100644 --- a/packages/latex2js/latex2js.css +++ b/packages/latex2js/latex2js.css @@ -151,6 +151,14 @@ h4.theorem-head::after { pre { overflow: auto; } + +/* Verbatim blocks render as plain, page-coloured code — no gray box, padding, + or rounding. Consumers who want a code-block look override this rule. */ +pre.verbatim { + background-color: transparent; + padding: 0; + border-radius: 0; +} /* * Paragraph spacing. A run of blank lines is one \par however long it is, so * the gap belongs to the document rather than to how many times the author hit diff --git a/packages/react/src/components/verbatim.tsx b/packages/react/src/components/verbatim.tsx index 62f17405..4a00987c 100644 --- a/packages/react/src/components/verbatim.tsx +++ b/packages/react/src/components/verbatim.tsx @@ -6,14 +6,5 @@ interface VerbatimProps { } export default ({ lines }: VerbatimProps) => ( -
+  
 );

From 6e47ae9c4bc30469e24c12b9991360b234a1544b Mon Sep 17 00:00:00 2001
From: Dan Lynch 
Date: Mon, 24 Aug 2026 02:07:43 -0700
Subject: [PATCH 2/2] chore(bundle): refresh shipped latex2js.css (verbatim
 rule)

pnpm build copies packages/latex2js/latex2js.css into bundle/latex2js.css;
the verbatim CSS landed in the source but the committed bundle stayed
stale, failing the 'Shipped bundle is up to date' check.
---
 bundle/latex2js.css | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bundle/latex2js.css b/bundle/latex2js.css
index 6fe80441..3ae5f55f 100644
--- a/bundle/latex2js.css
+++ b/bundle/latex2js.css
@@ -151,6 +151,14 @@ h4.theorem-head::after {
 pre {
   overflow: auto;
 }
+
+/* Verbatim blocks render as plain, page-coloured code — no gray box, padding,
+   or rounding. Consumers who want a code-block look override this rule. */
+pre.verbatim {
+  background-color: transparent;
+  padding: 0;
+  border-radius: 0;
+}
 /*
  * Paragraph spacing. A run of blank lines is one \par however long it is, so
  * the gap belongs to the document rather than to how many times the author hit