mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 19:39:43 +02:00
#935 Fix for stylink of links. Default theme colors are picked up and styling via themeCSS works
This commit is contained in:
@@ -4,22 +4,31 @@
|
|||||||
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
|
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
|
<style>
|
||||||
|
body {background: black}
|
||||||
|
h1 { color: white;}
|
||||||
|
.arrowheadPath {fill: red;}
|
||||||
|
|
||||||
|
.edgePath .path {stroke: red;}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>info below</h1>
|
<h1>info below</h1>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div class="mermaid">graph TD
|
<div class="mermaid">graph TD
|
||||||
A["a=b &&</b>"]
|
A ==> B
|
||||||
A["a=b && a>b</b>"]
|
A --> C
|
||||||
|
A -.-> D
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="./mermaid.js"></script>
|
<script src="./mermaid.js"></script>
|
||||||
<script>
|
<script>
|
||||||
mermaid.initialize({
|
mermaid.initialize({
|
||||||
theme: 'forest',
|
theme: 'dark',
|
||||||
// arrowMarkerAbsolute: true,
|
// arrowMarkerAbsolute: true,
|
||||||
// themeCSS: '.node rect { fill: red; }',
|
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
|
||||||
logLevel: 3,
|
logLevel: 3,
|
||||||
flowchart: { curve: 'linear', "htmlLabels": false },
|
flowchart: { curve: 'linear', "htmlLabels": false },
|
||||||
gantt: { axisFormat: '%m/%d/%Y' },
|
gantt: { axisFormat: '%m/%d/%Y' },
|
||||||
|
@@ -213,10 +213,10 @@ export const addEdges = function(edges, g) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'dotted':
|
case 'dotted':
|
||||||
style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
|
style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';
|
||||||
break;
|
break;
|
||||||
case 'thick':
|
case 'thick':
|
||||||
style = 'stroke: #333; stroke-width: 3.5px;fill:none';
|
style = ' stroke-width: 3.5px;fill:none';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user