Fix mermaid rendering, table column widths, and display math size - #57
Merged
Conversation
- Fix mermaid not rendering when a saved theme is stored in localStorage:
the theme restore script was calling mermaid.initialize({startOnLoad:
false}), overriding the initial startOnLoad:true config. Changed to
startOnLoad:false and explicit mermaid.run() in DOMContentLoaded.
Also pinned mermaid CDN to v10 to avoid future breaking API changes.
- Change table width from 100% to auto so column widths are sized by
content rather than being distributed equally across the container.
- Add font-size:0.9em and overflow-x:auto to .math.display to reduce
display math size and support wide formulas on narrow screens.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
mermaid.initialize({startOnLoad: false})on page load, overriding the initialstartOnLoad: trueconfig before DOMContentLoaded fired. Fixed by switching tostartOnLoad: false+ explicitmermaid.run()in DOMContentLoaded. Also pinned the CDN tomermaid@10to prevent future breaking API changes.width: 100%towidth: autowith explicittable-layout: autoso each column sizes itself to its content instead of distributing space equally.font-size: 0.9em; overflow-x: autoto.math.displayto reduce block math size relative to body text and handle wide formulas on narrow screens.Test plan
$$...$$) — confirm it is slightly smaller than before and wide formulas scroll horizontally🤖 Generated with Claude Code