Repository navigation
Conversation
Member
|
It's true that the
The menu code needs an overhaul, and this (and other issues) can be addressed during that update. |
drgrice1
approved these changes
Oct 28, 2026
drgrice1
left a comment
Member
There was a problem hiding this comment.
I think that this will work for now. At least until MathJax overhauls its menu code.
The MathJax menu does not honor the light/dark setting and is always set based on the browser setting. In addition MathJax does not expose the menu the same way it does other elements. This goes around that and accesses the MathJax Menu directly, and sets the theme based on the setting in the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
somiaj
force-pushed
the
mathjax-menu-dark-mode
branch
from
October 28, 2026 13:33
a1c258c to
23b30a3
Compare
Contributor
Author
|
@dpvc Thanks, I should learn to find the docs first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MathJax menu does not honor the light/dark setting and is always set based on the browser setting. In addition MathJax does not expose the menu the same way it does other elements. This goes around that and accesses the MathJax Menu directly, and sets the theme based on the setting in the page.
This fix works, unsure how well it does the job, as I don't understand the MathJax internals that well.
@dpvc This also affects the MathJax no-dark-mode.js, and seems MathJax needs to better expose the menu to allow updating its theme to match the chosen one vs the browser.