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

when the length of the Math Equation is too long #3914

Closed
4 tasks done
DrAugus opened this issue May 24, 2024 · 1 comment
Closed
4 tasks done

when the length of the Math Equation is too long #3914

DrAugus opened this issue May 24, 2024 · 1 comment
Labels
contribution welcome The team would welcome a contribution from the community for this issue theme Related to the theme

Comments

@DrAugus
Copy link

DrAugus commented May 24, 2024

Is your feature request related to a problem? Please describe.

If the length of a mathematical formula is too long and exceeds the page width, can a scrollbar be added to the mjx-container?

mjx-container {
display: inline-block;
margin: auto 2px -2px;
}

phone screenshot

img_v3_02b6_900219f1-55ba-4b50-95cd-f3d987c9a21g

Describe the solution you'd like

css add

mjx-container {
  display: inline-block;
  margin: auto 2px -2px;
  overflow-x: auto;
  max-width: 100%;
}

Describe alternatives you've considered

No response

Additional context

No response

Validations

@brc-dd brc-dd added theme Related to the theme contribution welcome The team would welcome a contribution from the community for this issue labels May 24, 2024
@laplacetw
Copy link

laplacetw commented May 30, 2024

I made vitepress-theme-trigger for my blog and optimized MathJax style for mobile with Tailwind CSS :

mjx-container[style*="display: block;"] {
  @apply overflow-x-auto overflow-y-hidden;
}

mjx-container > svg {
  @apply inline-block;
}
Phone Screenshot for Demo

demo

Link for online demo➡️

@brc-dd brc-dd closed this as completed in afc611d Jun 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 11, 2024
niceplugin added a commit to niceplugin/vitepress-KO that referenced this issue Jul 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution welcome The team would welcome a contribution from the community for this issue theme Related to the theme
Projects
None yet
Development

No branches or pull requests

3 participants