From 0cae040494a8218a1a08e3448f10578d7d48ba23 Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Sun, 25 Oct 2026 18:41:14 +0000 Subject: [PATCH] A displayed formula scrolls inside its own box Try online's LaTeX example is 272px wide, and at 320px it reached 18px past the window's right edge, where the body's overflow-x: hidden cuts it off. A displayed formula now scrolls sideways inside its own box when it does not fit. overflow-y: hidden keeps that box from also growing a vertical scrollbar, and on its own it cut the bottom pixel row off the closing parenthesis of f(x), whose ink reaches below the box MathJax gives it. One pixel of padding keeps it: at 1280px Try online renders pixel for pixel as before down to the formula, and is one pixel taller. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura --- styles.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/styles.css b/styles.css index 45a516c15..7e9b1db9d 100644 --- a/styles.css +++ b/styles.css @@ -85,6 +85,13 @@ summary { outline: none; } +/* A displayed formula wider than the column scrolls inside its own box instead of running off the page. The padding keeps the bottom pixel of a parenthesis, whose ink reaches below the box MathJax gives it */ +mjx-container[display="true"] { + overflow-x: auto; + overflow-y: hidden; + padding-bottom: 1px; +} + @media (max-width: 1099px) { .main {