Fix Mermaid overflow in ExperimentSummary (constrain rendered SVGs)#81
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f66a90f98
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23c3b29ce6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| width: auto !important; | ||
| max-width: none !important; |
There was a problem hiding this comment.
Preserve Mermaid SVG width for scrolling
For the default Mermaid output I inspected, the SVG is emitted as width="100%" with an inline max-width: <diagram width>px; this rule overrides both with width: auto and max-width: none. In browsers that leaves the inline SVG with no concrete rendered width other than its intrinsic/fallback sizing, so large Mermaid charts in the Intro tab are shrunk instead of keeping their full diagram width inside the overflow-x: auto wrapper, making the intended horizontal scroll unavailable and wide diagrams hard to read.
Useful? React with 👍 / 👎.
Motivation
introcould be wider than the container and force the ExperimentSummary layout to expand horizontally.Description
.intro) includingmax-width: 100%,min-width: 0, andoverflow-wrap: anywhereto prevent children from expanding the container.max-width: 100%andheight: autoso they scale down responsively..mermaid-diagramrules to make rendered Mermaid diagrams display as block-level elements withmax-width: 100%, internal horizontal scrolling (overflow-x: auto), and force the inner SVG to usewidth: auto !importantandmax-width: 100% !important.src/views/ExperimentSummary.vuefor consistent inline styles.Testing
npm run buildand the build completed successfully.npx prettier --write src/views/ExperimentSummary.vueandgit diff --checkwith no issues reported.npm run dev) and verified layout changes in-browser.Codex Task