Skip to content

Work around Safari bug with negative margins used in bussproofs. (mathjax/MathJax#3547)#1457

Open
dpvc wants to merge 2 commits intofix/margin-spacingfrom
issue3547
Open

Work around Safari bug with negative margins used in bussproofs. (mathjax/MathJax#3547)#1457
dpvc wants to merge 2 commits intofix/margin-spacingfrom
issue3547

Conversation

@dpvc
Copy link
Copy Markdown
Member

@dpvc dpvc commented Apr 7, 2026

This PR works around a bug in Safari that causes the negative spacing at the right-hand side of bussproof layouts to be ignored when computing the widths of the parent element. This does away with the mspace elements at the left and right of the layouts and uses margin-left and margin-right CSS attributes instead. I have resisted using CSS in this way in the past, trying to keep everything in MathML directly, but could not find another solution that worked in all browsers.

Resolves issue mathjax/MathJax#3547.

Copy link
Copy Markdown
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

Nice. That makes the structures a lot cleaner.

@dpvc
Copy link
Copy Markdown
Member Author

dpvc commented Apr 9, 2026

I've made another commit to this branch to remove a check for mspace elements that are no longer used. Do you want to re-review?

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.

2 participants