diff --git a/third_party/muya/src/assets/styles/inlineSyntax.css b/third_party/muya/src/assets/styles/inlineSyntax.css index 85fedc3..72e9d2e 100644 --- a/third_party/muya/src/assets/styles/inlineSyntax.css +++ b/third_party/muya/src/assets/styles/inlineSyntax.css @@ -217,6 +217,20 @@ code.mu-inline-rule { height: 6px; } +/* KaTeX gives every sub/superscript a 2px `.vlist-s` strut that + `.vlist-t2 { margin-right: -2px }` cancels visually. The negative margin fixes + layout width but not scrollWidth, so the `overflow: auto` above draws a + spurious scrollbar under any short formula ending in a sub/superscript + (#4837). Zero both to match the scroll extent to the visible width. */ +.mu-math > .mu-math-render .katex .vlist-s { + width: 0; + min-width: 0; +} + +.mu-math > .mu-math-render .katex .vlist-t2 { + margin-right: 0; +} + .mu-ruby > .mu-ruby-render { left: 50%;