fix: fix personBorder/Bkg C4 diagram theme vars

The current `personBorder`/`personBkg` theme variables for C4 diagrams
are set to the string `'calculated'`.

However, despite being `'calculated'`, they never seem to change to
anything else, and so become invalid CSS variables.

I've instead changed these to just default to base theme vars,
as that's what they do in [`these-base.js`][1].

[1]: 727bf30824/packages/mermaid/src/themes/theme-base.js (L106-L107)
This commit is contained in:
Alois Klink
2023-04-13 05:48:02 +01:00
parent 83d7d6c48f
commit 616d370a51
4 changed files with 8 additions and 12 deletions

View File

@@ -81,9 +81,8 @@ class Theme {
this.todayLineColor = '#DB5757';
/* C4 Context Diagram variables */
this.personBorder = 'calculated';
this.personBkg = 'calculated';
this.personBorder = this.primaryBorderColor;
this.personBkg = this.mainBkg;
/* state colors */
this.labelColor = 'calculated';

View File

@@ -109,9 +109,8 @@ class Theme {
this.todayLineColor = 'red';
/* C4 Context Diagram variables */
this.personBorder = 'calculated';
this.personBkg = 'calculated';
this.personBorder = this.primaryBorderColor;
this.personBkg = this.mainBkg;
/* state colors */
this.labelColor = 'black';

View File

@@ -83,9 +83,8 @@ class Theme {
this.todayLineColor = 'red';
/* C4 Context Diagram variables */
this.personBorder = 'calculated';
this.personBkg = 'calculated';
this.personBorder = this.primaryBorderColor;
this.personBkg = this.mainBkg;
/* state colors */
this.labelColor = 'black';

View File

@@ -95,9 +95,8 @@ class Theme {
this.todayLineColor = 'calculated';
/* C4 Context Diagram variables */
this.personBorder = 'calculated';
this.personBkg = 'calculated';
this.personBorder = this.primaryBorderColor;
this.personBkg = this.mainBkg;
/* state colors */
this.labelColor = 'black';