From 896c7eca578d9c9b27274ead6e717b3b54d84d18 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 15 Jul 2021 10:58:22 +0200 Subject: [PATCH] Fix for issue with updated stylis --- src/mermaidAPI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index bcbed3825..3a39f3228 100755 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -337,7 +337,7 @@ const render = function(id, _txt, cb, container) { const rules = stylis(`#${id}`, getStyles(graphType, userStyles, cnf.themeVariables)); const style1 = document.createElement('style'); - style1.innerHTML = rules; + style1.innerHTML = `#${id} ` + rules; svg.insertBefore(style1, firstChild); // Verify that the generated svgs are ok before removing this