diff --git a/cypress/integration/rendering/flowchart.spec.js b/cypress/integration/rendering/flowchart.spec.js
index 4ea4cbcee..06c84ac2e 100644
--- a/cypress/integration/rendering/flowchart.spec.js
+++ b/cypress/integration/rendering/flowchart.spec.js
@@ -524,4 +524,36 @@ describe('Flowchart', () => {
{ flowchart: { htmlLabels: false } }
);
});
+
+ it('25: Set node text color according to style when html labels are enabled', () => {
+ imgSnapshotTest(
+ `graph LR
+ A[red
text] --> B(blue
text)
+ C[/red
text/] --> D{blue
text}
+ style A color:red;
+ style B color:blue;
+ style C stroke:#ff0000,fill:#ffcccc,color:#ff0000
+ style D stroke:#0000ff,fill:#ccccff,color:#0000ff
+ click B "index.html#link-clicked" "link test"
+ click D testClick "click test"
+ `,
+ { flowchart: { htmlLabels: true } }
+ );
+ });
+
+ it('26: Set node text color according to style when html labels are disabled', () => {
+ imgSnapshotTest(
+ `graph LR
+ A[red
text] --> B(blue
text)
+ C[/red
text/] --> D{blue
text}
+ style A color:red;
+ style B color:blue;
+ style C stroke:#ff0000,fill:#ffcccc,color:#ff0000
+ style D stroke:#0000ff,fill:#ccccff,color:#0000ff
+ click B "index.html#link-clicked" "link test"
+ click D testClick "click test"
+ `,
+ { flowchart: { htmlLabels: false } }
+ );
+ });
});
diff --git a/dist/index.html b/dist/index.html
index 2505d8010..9df88224e 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -353,6 +353,17 @@ graph TB
linkStyle 1 stroke:greenyellow,stroke-width:2px
style C fill:greenyellow,stroke:green,stroke-width:4px
+