Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add overflow-y: hidden to mathjax containers #675

Merged
merged 2 commits into from
Mar 28, 2024
Merged

add overflow-y: hidden to mathjax containers #675

merged 2 commits into from
Mar 28, 2024

Conversation

thehappycheese
Copy link
Contributor

closes #674

Adds overflow-y:hidden to the mathjax container template CSS.

This removes unnesisary vertical scroll bars that show up in Chrome and Edge when overflow-x is set to auto, particularly for multi-line display mode math blocks.

Click Here to expand source code for images below

test_module.py:

r"""
# Inline math tests

this is an $i=n$ line math expression

# Single line display mode

Long (always needs horizontal scroll)

$$
5a^3b^2 - 2b^4c + 7c^2d^3e - 3d^2ef^2 + 6e^3f - 4a^2f^3 + 9a^4bc^2 - 8b^3d^2e^2 + 3c^5de - 7d^3e^4f + 2a^2b^2c^3 - 6b^5df^2 + 4c^3d^4e^2 - 9d^2e^3f^3 + 5a^3cf^4 - 2b^2d^5e + 8c^4d^2f - 6a^5be^3 + 7b^3c^2d^3
$$

Short (never needs scroll)

$$
5a^3b^2 - 2b^4c + 7c^2d^3e - 3d^2ef^2
$$

# Multi line display mode

$$
\\begin{align}
2x^2 + 3y - 7z &= 5 \\\\
11 &= 4x - 6y^3 + 2z^2 + 5a^3b^2 - 2b^4c + 7c^2d^3e - 3d^2ef^2 + 6e^3f - 4a^2f^3 \\\\
9x^3 - 5y^2 + z &= 3
\\end{align}
$$

"""

Before

image

After

image

Copy link
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🍰

@mhils mhils merged commit 2d58854 into mitmproxy:main Mar 28, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add overflow-y: hidden; to css style mjx-container
2 participants