Closed Bug 2072107 Opened 2 months ago Closed 2 months ago

Center narrow Mermaid diagrams horizontally within the page

Categories

(Developer Infrastructure :: Source Documentation, enhancement)

enhancement

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

A mermaid diagram narrower than the body column renders against the column's left edge, and the directive's :align: center option does not move it: sphinxcontrib-mermaid wraps each diagram in a .mermaid-container flex box for its fullscreen button, so the diagram's box is a flex item, while :align: lands on the figure and centers only the caption.

justify-content: safe center on .mermaid-container centers a diagram that fits. safe keeps a wider one at the column's start, where the edge fade from bug 2071267 and the tab stop from bug 2071268 still reach all of it.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/1a9163e47b88 https://hg.mozilla.org/integration/autoland/rev/eccb8a700361 Center narrow Mermaid diagrams horizontally within the page. r=firefox-source-docs-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: