9b689b2885
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m48s
Build · Site / build (pull_request) Successful in 7s
Tests · UI / test (pull_request) Successful in 3m20s
Tests · Go / test (pull_request) Successful in 2m11s
markdown-it-mathjax3 renders each formula as a visible SVG plus a MathML twin (<mjx-assistive-mml>) for screen readers, hidden via CSS scoped to a per-container #mjx-<id> selector. In the static build the containers carry no id, so that scoped rule matches nothing and the twin renders as a second, oversized (theme-monospaced) copy of every formula, in every browser. Add a global visually-hidden rule for mjx-assistive-mml in the theme CSS: the twin stays in the DOM for assistive tech but is removed from view and from layout.
34 lines
1.2 KiB
CSS
34 lines
1.2 KiB
CSS
/*
|
|
* Minimal, restrained theme. No flashy hero or bright accents — the
|
|
* project site leans "nerdy" with a fixed-width type stack. System
|
|
* fonts first so nothing is downloaded.
|
|
*/
|
|
:root {
|
|
--vp-font-family-base: ui-monospace, "JetBrains Mono", "SF Mono",
|
|
"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 (<mjx-assistive-mml>) for screen readers, and hides the twin with CSS
|
|
* scoped to a per-container `#mjx-<id>` 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;
|
|
}
|