File tree Expand file tree Collapse file tree 2 files changed +35
-4
lines changed Expand file tree Collapse file tree 2 files changed +35
-4
lines changed Original file line number Diff line number Diff line change @@ -185,20 +185,28 @@ function mermaidConfig() {
185
185
rehypeMermaid ,
186
186
/** @type {import("rehype-mermaid").RehypeMermaidOptions } */ ( {
187
187
mermaidConfig : {
188
- fontFamily : "var(--font-mono, monospace )" ,
188
+ fontFamily : "var(--font-sans )" , // we can't use monospace here because it's way too wide
189
189
theme : "null" ,
190
190
look : "classic" ,
191
+ flowchart : {
192
+ defaultRenderer : "elk" ,
193
+ padding : 6 ,
194
+ } ,
191
195
themeCSS : `
192
196
.node rect {
193
- fill: hsl( var(--color-neu-50) );
194
- stroke: hsl( var(--color-neu-300) );
197
+ fill: var(--mermaid-node-fill );
198
+ stroke: var(--mermaid-node-stroke );
195
199
}
196
200
.label text, span {
197
201
fill: hsl(var(--color-neu-900));
198
202
color: hsl(var(--color-neu-900));
199
203
}
200
204
.flowchart-link {
201
- stroke: hsl(var(--color-neu-500));
205
+ stroke: var(--mermaid-arrow);
206
+ }
207
+ .marker {
208
+ stroke: var(--mermaid-arrow);
209
+ fill: var(--mermaid-arrow);
202
210
}
203
211
` ,
204
212
} ,
Original file line number Diff line number Diff line change @@ -453,3 +453,26 @@ html:has([role="menu"][data-open]) {
453
453
overscroll-behavior-y : none;
454
454
}
455
455
}
456
+
457
+ .flowchart {
458
+ --mermaid-node-fill : hsl (var (--color-neu-100 ));
459
+ --mermaid-node-stroke : hsl (var (--color-neu-200 ));
460
+ --mermaid-arrow : hsl (var (--color-neu-500 ));
461
+
462
+ margin : 1.5rem auto 0 auto;
463
+
464
+ & .label text ,
465
+ span {
466
+ font-size : 14px !important ;
467
+ }
468
+
469
+ & div : has (> .nodeLabel ) {
470
+ display : unset !important ;
471
+ }
472
+ }
473
+
474
+ .dark .flowchart {
475
+ --mermaid-node-fill : hsl (var (--color-neu-50 ) / 0.5 );
476
+ --mermaid-node-stroke : hsl (var (--color-neu-100 ));
477
+ --mermaid-arrow : hsl (var (--color-neu-300 ));
478
+ }
You can’t perform that action at this time.
0 commit comments