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

The style border-spacing of parent element affects fractions rendering #2861

Closed
kwankyu opened this issue Apr 9, 2022 · 3 comments
Closed
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.2
Milestone

Comments

@kwankyu
Copy link

kwankyu commented Apr 9, 2022

This is observed with MathJax3 with CHTML rendering. For example,

      <table style="border-spacing:20px">
          <tr><td><span>$\frac{1}{2}$</span></td></tr>
      </table>   

display the fraction with too much spacing. SVG rendering is okay.

@dpvc dpvc added Ready for Development Accepted Issue has been reproduced by MathJax team v3 labels Apr 11, 2022
@dpvc
Copy link
Member

dpvc commented Apr 11, 2022

MathJax uses display:table to lay out the fraction, and so the border-spacing from your table is affecting that. A work-around for now is to set

mix-math {
  border-collapse: collapse
}

in your page's CSS. MathJax resets a number of CSS properties to avoid bleed-through from the rest of the page, but that is not one that gets reset. I will have to add it to the list of properties that are set for MathJax's output.

@dpvc dpvc added this to the 3.2.1 milestone Apr 11, 2022
@dpvc dpvc self-assigned this Apr 11, 2022
@kwankyu
Copy link
Author

kwankyu commented Apr 12, 2022

Thank you for the quick comment!

dpvc added a commit to mathjax/MathJax-src that referenced this issue Apr 19, 2022
dpvc added a commit to mathjax/MathJax-src that referenced this issue May 1, 2022
Include CSS to reset border-collapse in CHTML output.  (mathjax/MathJax#2861)
@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels May 1, 2022
@dpvc dpvc removed their assignment Jun 1, 2022
@dpvc dpvc added Fixed v3.2 and removed Merged Merged into develop branch labels Jun 1, 2022
@dpvc dpvc closed this as completed Jun 1, 2022
@kwankyu
Copy link
Author

kwankyu commented Jun 1, 2022

Thank you for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Needed v3 v3.2
Projects
None yet
Development

No branches or pull requests

2 participants