<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Levi Liu</title>
    <description>The latest articles on DEV Community by Levi Liu (@levi_liu).</description>
    <link>https://dev.to/levi_liu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3923265%2Ffe4d37ec-b536-47ca-961f-52b899ecf158.png</url>
      <title>DEV Community: Levi Liu</title>
      <link>https://dev.to/levi_liu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/levi_liu"/>
    <language>en</language>
    <item>
      <title>How to Render Mermaid Diagrams as SVG (and Stop Looking Like Every Other README)</title>
      <dc:creator>Levi Liu</dc:creator>
      <pubDate>Sun, 10 May 2026 22:00:00 +0000</pubDate>
      <link>https://dev.to/levi_liu/how-to-render-mermaid-diagrams-as-svg-and-stop-looking-like-every-other-readme-1e10</link>
      <guid>https://dev.to/levi_liu/how-to-render-mermaid-diagrams-as-svg-and-stop-looking-like-every-other-readme-1e10</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;
Mermaid renders to SVG natively — but the default output usually isn't what you want in a README, slide, or doc. This post walks through the official &lt;code&gt;mmdc&lt;/code&gt; CLI, the four theming knobs that actually matter, the three rendering pitfalls everyone hits (fonts, viewBox, dark mode), and the fastest path when you don't want to fight with config. There's a &lt;a href="https://www.beauty-diagram.com/editor" rel="noopener noreferrer"&gt;live editor&lt;/a&gt; at the end if you want to skip ahead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The problem nobody talks about
&lt;/h2&gt;

&lt;p&gt;Mermaid is the de-facto "diagrams as code" choice in 2026 — GitHub, Notion, Obsidian, Docusaurus, GitLab, every static site generator worth its salt renders it natively.&lt;/p&gt;

&lt;p&gt;That's the good news.&lt;/p&gt;

&lt;p&gt;The bad news: 95% of Mermaid diagrams in the wild look exactly the same. Pastel pinks and blues, Comic-Sans-adjacent fonts, edges crossing nodes, arrowheads that don't quite point at anything. You've seen them. You've probably shipped some.&lt;/p&gt;

&lt;p&gt;It's not a Mermaid problem — it's a defaults problem. The renderer is optimized for "something showed up", not "this is presentable".&lt;/p&gt;

&lt;h2&gt;
  
  
  Why SVG and not PNG
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;SVG&lt;/th&gt;
&lt;th&gt;PNG&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scales without blur&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accessible (text selectable)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Adapts to dark mode (&lt;code&gt;currentColor&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Searchable in your repo&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Approach 1: The official Mermaid CLI
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Run without installing&lt;/span&gt;
npx @mermaid-js/mermaid-cli &lt;span class="nt"&gt;-i&lt;/span&gt; diagram.mmd &lt;span class="nt"&gt;-o&lt;/span&gt; diagram.svg

&lt;span class="c"&gt;# Or install globally&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @mermaid-js/mermaid-cli
mmdc &lt;span class="nt"&gt;-i&lt;/span&gt; diagram.mmd &lt;span class="nt"&gt;-o&lt;/span&gt; diagram.svg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The four theming knobs that actually matter
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;theme&lt;/code&gt; (the cheapest win)
&lt;/h3&gt;

&lt;p&gt;Built-in Mermaid themes: &lt;code&gt;default&lt;/code&gt;, &lt;code&gt;forest&lt;/code&gt;, &lt;code&gt;dark&lt;/code&gt;, &lt;code&gt;neutral&lt;/code&gt;, &lt;code&gt;base&lt;/code&gt;. Pick &lt;code&gt;base&lt;/code&gt; if you want to customize from scratch.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;themeVariables&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Six variables actually matter: &lt;code&gt;primaryColor&lt;/code&gt;, &lt;code&gt;primaryTextColor&lt;/code&gt;, &lt;code&gt;primaryBorderColor&lt;/code&gt;, &lt;code&gt;lineColor&lt;/code&gt;, &lt;code&gt;fontFamily&lt;/code&gt;, &lt;code&gt;fontSize&lt;/code&gt;. Set those well, ignore the other 50.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Edge curves
&lt;/h3&gt;

&lt;p&gt;Change edge curves from the default to &lt;code&gt;linear&lt;/code&gt; or &lt;code&gt;step&lt;/code&gt;. The default &lt;code&gt;basis&lt;/code&gt; everywhere is one of the top reasons README diagrams look amateur.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Layout direction
&lt;/h3&gt;

&lt;p&gt;Pick based on reading flow. &lt;code&gt;LR&lt;/code&gt; for pipelines, &lt;code&gt;TD&lt;/code&gt; for hierarchies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three rendering pitfalls
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Fonts don't render in the saved SVG
&lt;/h3&gt;

&lt;p&gt;Use a system font stack: &lt;code&gt;-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  viewBox cropping
&lt;/h3&gt;

&lt;p&gt;Post-process to add padding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;padViewBox&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;svgString&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;svgString&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sr"&gt;/viewBox="&lt;/span&gt;&lt;span class="se"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;-&lt;/span&gt;&lt;span class="se"&gt;?\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.?\d&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt; &lt;/span&gt;&lt;span class="se"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;-&lt;/span&gt;&lt;span class="se"&gt;?\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.?\d&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt; &lt;/span&gt;&lt;span class="se"&gt;(\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.?\d&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt; &lt;/span&gt;&lt;span class="se"&gt;(\d&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;\.?\d&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="sr"&gt;"/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ny&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nh&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;padding&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`viewBox="&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;nx&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;ny&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;nw&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;nh&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Dark mode is hardcoded
&lt;/h3&gt;

&lt;p&gt;Replace fixed colors with &lt;code&gt;currentColor&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;makeAdaptive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;svgString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;svgString&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/stroke="#&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;0-9a-fA-F&lt;/span&gt;&lt;span class="se"&gt;]{6}&lt;/span&gt;&lt;span class="sr"&gt;"/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stroke="currentColor"&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/fill="#&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;0-9a-fA-F&lt;/span&gt;&lt;span class="se"&gt;]{6}&lt;/span&gt;&lt;span class="sr"&gt;"/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fill="currentColor"&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When DIY stops being worth the time
&lt;/h2&gt;

&lt;p&gt;Everything above works. I've shipped this exact pipeline.&lt;/p&gt;

&lt;p&gt;It also takes about a day of fiddling to get right, and the result is one diagram style that you maintain forever. The moment you want a different style for a different context — a slide deck vs. a README vs. a postmortem — or someone non-technical on the team wants to make a diagram, the cost-benefit shifts.&lt;/p&gt;

&lt;p&gt;Three signals it's time to stop hand-rolling:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You're maintaining a "diagram theme" file across multiple repos.&lt;/li&gt;
&lt;li&gt;You want a different look for slides vs. docs vs. PRs, but the diagram source stays the same.&lt;/li&gt;
&lt;li&gt;Your inputs aren't just Mermaid — PlantUML, draw.io, AI prompts.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The shortcut: Paste, pick a theme, export&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.beauty-diagram.com" rel="noopener noreferrer"&gt;Beauty Diagram&lt;/a&gt; is a web editor for Mermaid, PlantUML, and draw.io. Paste your source, pick from 9 production themes, export SVG or PNG. No config files. &lt;em&gt;(Disclosure: I work on it.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.beauty-diagram.com/editor" rel="noopener noreferrer"&gt;→ Open the editor&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;The fastest path is the &lt;a href="https://www.beauty-diagram.com/editor" rel="noopener noreferrer"&gt;web editor&lt;/a&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Paste&lt;/strong&gt; your Mermaid source on the left.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick a theme&lt;/strong&gt; from nine: &lt;code&gt;classic&lt;/code&gt;, &lt;code&gt;modern&lt;/code&gt;, &lt;code&gt;atlas&lt;/code&gt;, &lt;code&gt;blueprint&lt;/code&gt;, &lt;code&gt;memphis&lt;/code&gt;, &lt;code&gt;obsidian&lt;/code&gt;, &lt;code&gt;slate&lt;/code&gt;, &lt;code&gt;brutalist&lt;/code&gt;, &lt;code&gt;atelier&lt;/code&gt;. Each is a complete design language — typography, palette, edge style, node treatment — tuned so the diagram reads as a finished asset, not a default render.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export&lt;/strong&gt; SVG (vector for docs / repos) or PNG (&lt;code&gt;standard&lt;/code&gt; / &lt;code&gt;high&lt;/code&gt; / &lt;code&gt;max&lt;/code&gt; quality for slides and social).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Share&lt;/strong&gt; to get a public hot-linkable URL with an OG preview — drop it into Notion or Linear and it stays live as you edit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zbvucn337gny32s27di.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4zbvucn337gny32s27di.png" alt=" " width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's the whole loop. No &lt;code&gt;themeVariables&lt;/code&gt; JSON to maintain. No post-processing scripts. The same renderer powers a CLI if you'd rather automate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Render once, ship to your repo&lt;/span&gt;
npx @beauty-diagram/cli beautify flow.mmd &lt;span class="nt"&gt;--theme&lt;/span&gt; modern &lt;span class="nt"&gt;--out&lt;/span&gt; flow.svg

&lt;span class="c"&gt;# Export at higher quality for slides&lt;/span&gt;
npx @beauty-diagram/cli &lt;span class="nb"&gt;export &lt;/span&gt;flow.mmd &lt;span class="nt"&gt;--theme&lt;/span&gt; atlas &lt;span class="nt"&gt;--format&lt;/span&gt; png &lt;span class="nt"&gt;--quality&lt;/span&gt; max &lt;span class="nt"&gt;--out&lt;/span&gt; flow.png

&lt;span class="c"&gt;# Get a public share URL (with OG preview baked in)&lt;/span&gt;
npx @beauty-diagram/cli share flow.mmd &lt;span class="nt"&gt;--theme&lt;/span&gt; modern &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Auth flow"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI exposes the same nine themes (&lt;code&gt;bd themes&lt;/code&gt; lists them). It does not expose per-variable overrides — the philosophy is that the theme is the choice; you don't tune a theme, you pick a different one. For most readers this is a feature, not a limitation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;Mermaid's defaults aren't bad — they're designed for "the diagram exists" rather than "the diagram is finished". The fixes break down into roughly three tiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cheap and fine for one style&lt;/strong&gt;: switch &lt;code&gt;theme: 'base'&lt;/code&gt;, set six theme variables, change edge curves, run a viewBox-padding regex.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Annoying past one repo&lt;/strong&gt;: maintain that config across many surfaces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a tool&lt;/strong&gt;: paste, pick, export.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where you land depends on how much you care about diagrams and how often you ship them.&lt;/p&gt;

&lt;p&gt;If this was useful, drop a ❤️ and follow — I'm posting weekly on diagrams, docs, and developer ergonomics. Next week: &lt;strong&gt;why your GitHub README diagrams look amateur, and the four fixes that take 10 minutes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;What's the worst Mermaid diagram you've shipped? Drop a screenshot in the comments — I'll write up the most common issues in a follow-up.&lt;/p&gt;

</description>
      <category>mermaid</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
