-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
/
styles.js
61 lines (57 loc) · 1.74 KB
/
styles.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const getStyles = (options) =>
`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0, 1, 2, 3, 4, 5, 6, 7]
.map(
(i) =>
`
.branch-label${i} { fill: ${options['gitBranchLabel' + i]}; }
.commit${i} { stroke: ${options['git' + i]}; fill: ${options['git' + i]}; }
.commit-highlight${i} { stroke: ${options['gitInv' + i]}; fill: ${options['gitInv' + i]}; }
.label${i} { fill: ${options['git' + i]}; }
.arrow${i} { stroke: ${options['git' + i]}; }
`
)
.join('\n')}
.branch {
stroke-width: 1;
stroke: ${options.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};}
.commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${
options.commitLabelBackground
}; opacity: 0.5; }
.tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}
.tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; }
.tag-hole { fill: ${options.textColor}; }
.commit-merge {
stroke: ${options.primaryColor};
fill: ${options.primaryColor};
}
.commit-reverse {
stroke: ${options.primaryColor};
fill: ${options.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${options.primaryColor};
fill: ${options.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${options.textColor};
}
`;
export default getStyles;