diff --git a/site/.vitepress/theme/custom.css b/site/.vitepress/theme/custom.css index e6baeb8..efa485e 100644 --- a/site/.vitepress/theme/custom.css +++ b/site/.vitepress/theme/custom.css @@ -8,3 +8,26 @@ "Fira Code", "DejaVu Sans Mono", Menlo, Consolas, monospace; --vp-font-family-mono: var(--vp-font-family-base); } + +/* + * markdown-it-mathjax3 renders each formula as a visible SVG plus a MathML + * twin () for screen readers, and hides the twin with CSS + * scoped to a per-container `#mjx-` selector. In the static build the + * containers carry no `id`, so that scoped rule matches nothing and the twin + * shows up as a second, oversized (theme-monospaced) copy of every formula. + * Hide it globally with the standard visually-hidden pattern: it stays in the + * DOM for assistive tech but is removed from view and from layout. + */ +mjx-assistive-mml { + position: absolute !important; + top: 0; + left: 0; + width: 1px !important; + height: 1px !important; + padding: 0 !important; + border: 0 !important; + overflow: hidden !important; + clip: rect(0 0 0 0) !important; + clip-path: inset(50%) !important; + white-space: nowrap !important; +}