mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-03 02:54:06 +01:00
#2088 Add the possibility to theme forks and joins using theme variables
This commit is contained in:
@@ -82,17 +82,17 @@ g.stateGroup line {
|
||||
}
|
||||
|
||||
.node circle.state-start {
|
||||
fill: ${options.stateBorder || options.lineColor};
|
||||
stroke: ${options.stateBorder || options.lineColor};
|
||||
fill: ${options.specialStateColor};
|
||||
stroke: ${options.specialStateColor};
|
||||
}
|
||||
|
||||
.node .fork-join {
|
||||
fill: ${options.stateBorder};
|
||||
stroke: ${options.stateBorder};
|
||||
fill: ${options.specialStateColor};
|
||||
stroke: ${options.specialStateColor};
|
||||
}
|
||||
|
||||
.node circle.state-end {
|
||||
fill: ${options.innerEndBackground || options.primaryBorderColor};
|
||||
fill: ${options.innerEndBackground};
|
||||
stroke: ${options.background};
|
||||
stroke-width: 1.5
|
||||
}
|
||||
|
||||
@@ -125,6 +125,7 @@ class Theme {
|
||||
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
||||
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
||||
this.transitionColor = this.transitionColor || this.lineColor;
|
||||
this.specialStateColor = this.lineColor;
|
||||
|
||||
/* class */
|
||||
this.classText = this.classText || this.textColor;
|
||||
|
||||
@@ -137,6 +137,7 @@ class Theme {
|
||||
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
||||
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
||||
this.innerEndBackground = this.primaryBorderColor;
|
||||
this.specialStateColor = this.lineColor;
|
||||
|
||||
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
||||
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
||||
|
||||
@@ -150,6 +150,7 @@ class Theme {
|
||||
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
||||
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
||||
this.innerEndBackground = this.primaryBorderColor;
|
||||
this.specialStateColor = this.lineColor;
|
||||
|
||||
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
||||
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
||||
|
||||
@@ -120,6 +120,7 @@ class Theme {
|
||||
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
||||
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
||||
this.innerEndBackground = this.primaryBorderColor;
|
||||
this.specialStateColor = this.lineColor;
|
||||
|
||||
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
||||
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
||||
|
||||
@@ -157,6 +157,7 @@ class Theme {
|
||||
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
||||
this.stateBorder = this.stateBorder || '#000';
|
||||
this.innerEndBackground = this.primaryBorderColor;
|
||||
this.specialStateColor = this.lineColor;
|
||||
|
||||
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
||||
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
||||
|
||||
Reference in New Issue
Block a user