From cfb0881d1fb93e755a9bf71a66d3ae5fa8e75d19 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Sun, 1 Feb 2026 14:09:27 -0700 Subject: [PATCH] refactor(math): use native MathML instead of KaTeX CDN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove external KaTeX stylesheet dependency in favor of browser-native MathML rendering. Aligns with suckless philosophy—zero external deps, works offline, smaller page loads. - Remove KaTeX CDN links from base.html - Hide katex-html layer, let browsers render MathML natively - Clean up obsolete CSS (.hide-tail, .katex-display) - Add minimal .math-display for block math layout --- docs/static/style.css | 13 +++++-------- docs/templates/base.html | 6 ------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/static/style.css b/docs/static/style.css index a7fb4d7..de6535b 100644 --- a/docs/static/style.css +++ b/docs/static/style.css @@ -262,22 +262,19 @@ a:hover { color: var(--accent-hover); } -/* KaTeX display math - local overrides */ -.katex-display { +/* Math (native MathML rendering) */ +.math-display { + display: block; margin: 1rem 0; overflow-x: auto; + text-align: center; } -/* Hide katex-html (requires CDN fonts), use native MathML rendering instead */ +/* Hide KaTeX HTML layer, use browser's native MathML instead */ .katex-html { display: none; } -/* Fallback: constrain radical SVG when CDN blocked */ -.hide-tail svg { - max-width: 100% !important; -} - /* Code */ code { font-family: diff --git a/docs/templates/base.html b/docs/templates/base.html index 53886e7..117459c 100644 --- a/docs/templates/base.html +++ b/docs/templates/base.html @@ -9,12 +9,6 @@ {{ title }} | {{ config.title }} - -