mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-03 11:04:06 +01:00
#1252 Adding background on commit labels
This commit is contained in:
@@ -225,8 +225,11 @@ class Theme {
|
||||
this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;
|
||||
this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;
|
||||
|
||||
this.tagLabelColor = this.tagLabelColor || this.darkMode ? this.branchLabelColor : 'white';
|
||||
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
||||
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
||||
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
||||
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
||||
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
||||
}
|
||||
calculate(overrides) {
|
||||
if (typeof overrides !== 'object') {
|
||||
|
||||
@@ -7,7 +7,7 @@ class Theme {
|
||||
this.secondaryColor = lighten(this.primaryColor, 16);
|
||||
|
||||
this.tertiaryColor = adjust(this.primaryColor, { h: -160 });
|
||||
this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
|
||||
this.primaryBorderColor = invert(this.background);
|
||||
this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
|
||||
this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
|
||||
this.primaryTextColor = invert(this.primaryColor);
|
||||
@@ -205,6 +205,12 @@ class Theme {
|
||||
this.gitInv5 = invert(this.git5);
|
||||
this.gitInv6 = invert(this.git6);
|
||||
this.gitInv7 = invert(this.git7);
|
||||
|
||||
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
||||
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
||||
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
||||
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
||||
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
||||
}
|
||||
calculate(overrides) {
|
||||
if (typeof overrides !== 'object') {
|
||||
|
||||
@@ -244,6 +244,12 @@ class Theme {
|
||||
this.gitBranchLabel5 = this.labelTextColor;
|
||||
this.gitBranchLabel6 = this.labelTextColor;
|
||||
this.gitBranchLabel7 = this.labelTextColor;
|
||||
|
||||
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
||||
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
||||
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
||||
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
||||
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
||||
}
|
||||
calculate(overrides) {
|
||||
if (typeof overrides !== 'object') {
|
||||
|
||||
@@ -206,6 +206,12 @@ class Theme {
|
||||
this.gitInv5 = invert(this.git5);
|
||||
this.gitInv6 = invert(this.git6);
|
||||
this.gitInv7 = invert(this.git7);
|
||||
|
||||
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
||||
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
||||
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
||||
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
||||
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
||||
}
|
||||
calculate(overrides) {
|
||||
if (typeof overrides !== 'object') {
|
||||
|
||||
@@ -248,6 +248,12 @@ class Theme {
|
||||
this.gitBranchLabel5 = this.branchLabelColor;
|
||||
this.gitBranchLabel6 = this.branchLabelColor;
|
||||
this.gitBranchLabel7 = this.branchLabelColor;
|
||||
|
||||
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
||||
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
||||
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
||||
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
||||
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
||||
}
|
||||
calculate(overrides) {
|
||||
if (typeof overrides !== 'object') {
|
||||
|
||||
Reference in New Issue
Block a user