#935 Fix for stylink of links. Default theme colors are picked up and styling via themeCSS works

This commit is contained in:
Knut Sveidqvist
2019-12-08 10:10:03 +01:00
parent ddf8016a0c
commit d23ce9fb63
2 changed files with 15 additions and 6 deletions

View File

@@ -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' },

View File

@@ -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;
} }
} }