mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix: fix scaleLabelColor
in theme forest/neutral
The `scaleLabelColor` variable in `theme-forest` and `theme-neutral` was set to `"calculated"`, as it defaults to `this.labelTextColor` **before** `this.labelTextColor` was set. Moving the `this.labelTextColor` assignments before `scaleLabelColor` is calculated fixes this. Fixes mindmap and timeline invalid CSS in theme forest and neutral.
This commit is contained in:
parent
cd976871f0
commit
aee18ca018
@ -93,6 +93,15 @@ class Theme {
|
||||
this.errorTextColor = '#552222';
|
||||
}
|
||||
updateColors() {
|
||||
/* Sequence Diagram variables */
|
||||
this.actorBorder = darken(this.mainBkg, 20);
|
||||
this.actorBkg = this.mainBkg;
|
||||
this.labelBoxBkgColor = this.actorBkg;
|
||||
this.labelTextColor = this.actorTextColor;
|
||||
this.loopTextColor = this.actorTextColor;
|
||||
this.noteBorderColor = this.border2;
|
||||
this.noteTextColor = this.actorTextColor;
|
||||
|
||||
/* Each color-set will have a background, a foreground and a border color */
|
||||
this.cScale0 = this.cScale0 || this.primaryColor;
|
||||
this.cScale1 = this.cScale1 || this.secondaryColor;
|
||||
@ -144,16 +153,6 @@ class Theme {
|
||||
this.clusterBorder = this.border2;
|
||||
this.defaultLinkColor = this.lineColor;
|
||||
|
||||
/* Sequence Diagram variables */
|
||||
|
||||
this.actorBorder = darken(this.mainBkg, 20);
|
||||
this.actorBkg = this.mainBkg;
|
||||
this.labelBoxBkgColor = this.actorBkg;
|
||||
this.labelTextColor = this.actorTextColor;
|
||||
this.loopTextColor = this.actorTextColor;
|
||||
this.noteBorderColor = this.border2;
|
||||
this.noteTextColor = this.actorTextColor;
|
||||
|
||||
/* Gantt chart variables */
|
||||
|
||||
this.taskBorderColor = this.border1;
|
||||
|
@ -108,6 +108,22 @@ class Theme {
|
||||
this.secondBkg = lighten(this.contrast, 55);
|
||||
this.border2 = this.contrast;
|
||||
|
||||
/* Sequence Diagram variables */
|
||||
|
||||
this.actorBorder = lighten(this.border1, 23);
|
||||
this.actorBkg = this.mainBkg;
|
||||
this.actorTextColor = this.text;
|
||||
this.actorLineColor = this.lineColor;
|
||||
this.signalColor = this.text;
|
||||
this.signalTextColor = this.text;
|
||||
this.labelBoxBkgColor = this.actorBkg;
|
||||
this.labelBoxBorderColor = this.actorBorder;
|
||||
this.labelTextColor = this.text;
|
||||
this.loopTextColor = this.text;
|
||||
this.noteBorderColor = '#999';
|
||||
this.noteBkgColor = '#666';
|
||||
this.noteTextColor = '#fff';
|
||||
|
||||
/* Color Scale */
|
||||
/* Each color-set will have a background, a foreground and a border color */
|
||||
|
||||
@ -161,22 +177,6 @@ class Theme {
|
||||
this.defaultLinkColor = this.lineColor;
|
||||
this.titleColor = this.text;
|
||||
|
||||
/* Sequence Diagram variables */
|
||||
|
||||
this.actorBorder = lighten(this.border1, 23);
|
||||
this.actorBkg = this.mainBkg;
|
||||
this.actorTextColor = this.text;
|
||||
this.actorLineColor = this.lineColor;
|
||||
this.signalColor = this.text;
|
||||
this.signalTextColor = this.text;
|
||||
this.labelBoxBkgColor = this.actorBkg;
|
||||
this.labelBoxBorderColor = this.actorBorder;
|
||||
this.labelTextColor = this.text;
|
||||
this.loopTextColor = this.text;
|
||||
this.noteBorderColor = '#999';
|
||||
this.noteBkgColor = '#666';
|
||||
this.noteTextColor = '#fff';
|
||||
|
||||
/* Gantt chart variables */
|
||||
|
||||
this.sectionBkgColor = lighten(this.contrast, 30);
|
||||
|
Loading…
x
Reference in New Issue
Block a user