Fix for dark theme, class diagrams (v2)

This commit is contained in:
Knut Sveidqvist
2021-08-19 21:16:26 +02:00
parent b0c09a5b0f
commit fd6e59174e
2 changed files with 14 additions and 1 deletions

View File

@@ -457,7 +457,7 @@ export const draw = function (text, id) {
rect.setAttribute('ry', 0); rect.setAttribute('ry', 0);
rect.setAttribute('width', dim.width); rect.setAttribute('width', dim.width);
rect.setAttribute('height', dim.height); rect.setAttribute('height', dim.height);
rect.setAttribute('style', 'fill:#e8e8e8;'); // rect.setAttribute('style', 'fill:#e8e8e8;');
label.insertBefore(rect, label.firstChild); label.insertBefore(rect, label.firstChild);
} }

View File

@@ -12,6 +12,19 @@ const getStyles = (options) =>
} }
.nodeLabel, .edgeLabel {
color: ${options.classText};
}
.edgeLabel .label rect {
fill: ${options.mainBkg};
}
.label text {
fill: ${options.classText};
}
.edgeLabel .label span {
background: ${options.mainBkg};
}
.classTitle { .classTitle {
font-weight: bolder; font-weight: bolder;
} }