From e642b8e7773b277d86013d083275384bcc872b3e Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 26 Mar 2021 17:35:00 -0700 Subject: [PATCH] rendered_markdown: Add horizontal scrollbar to overflowing ```math. Fixes #14422. Signed-off-by: Anders Kaseorg --- static/styles/rendered_markdown.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/styles/rendered_markdown.css b/static/styles/rendered_markdown.css index 23670657d8..13f204822e 100644 --- a/static/styles/rendered_markdown.css +++ b/static/styles/rendered_markdown.css @@ -156,7 +156,12 @@ /* LaTeX styling */ .katex-display { - margin: 0 0; + /* KaTeX sometimes overdraws its bounding box by a little, so we + enlarge its scrolling area by stealing 3px from the margin + of the enclosing

. */ + margin: -3px 0; + padding: 3px 0; + overflow: auto hidden; } .tex-error {