#1865 Making title color woitk when htmnlLabels are used

This commit is contained in:
Knut Sveidqvist 2021-01-23 16:07:25 +01:00
parent e70b32e14d
commit ea9a893c24
2 changed files with 17 additions and 1 deletions

View File

@ -404,5 +404,20 @@ flowchart TD
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
it('63: title on subgraphs should be themable', () => {
imgSnapshotTest(
`
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
flowchart LR
subgraph A
a --> b
end
subgraph B
i -->f
end
A --> B
`,
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
);
});
});

View File

@ -55,8 +55,9 @@ const getStyles = options =>
stroke-width: 1px;
}
.cluster text {
.cluster text,span {
fill: ${options.titleColor};
color: ${options.titleColor};
}
div.mermaidTooltip {