Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Oct 19, 2025

This PR adds support for dark-mode colors. It also adjusts the CSS definitions to make it easier to read them (one style per line), and moves them all into a single style element. The addStyles_() method is refactored to check for the existence of the style element rather than using global variables; it would be good if MathJax could be used to control sub-documents like iframe elements or shadow DOM documents, so it would be good to move away from direct references to document in favor of a document that can be specified from a MathDocument, and this is a first step in that direction.

Finally, since the INFO boxes have been replaced by the DraggbleDialog class in MathJax, those CSS values are commented out and not used.

Because of the changes to the CSS string format, it might be easier to view the file directly rather than the diff.

@dpvc dpvc requested a review from zorkow October 19, 2025 19:36
Copy link
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. Looks considerably cleaner. Also most of the CSS was still the original one from MJ 2.7 so it was in need of a cleanup.

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.

3 participants