Add color handling for dark mode #37
Open
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.
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
styleelement. TheaddStyles_()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 likeiframeelements or shadow DOM documents, so it would be good to move away from direct references todocumentin favor of a document that can be specified from aMathDocument, 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 comment 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.