Skip to content

Commit 0b5f123

Browse files
Merge pull request #54 from commitd/sh/51
Improves mermaid.css
2 parents a5345fb + 6b92234 commit 0b5f123

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

theme/plugins/fix-links/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ module.exports = ({ markdownAST }, pluginOptions) => {
77
if (protocols.find((p) => node.url.startsWith(p))) {
88
return
99
}
10-
const old = node.url
11-
node.url = node.url.replace(/\.md$/, '')
10+
node.url = node.url.replace(/\.mdx?$/, '')
1211
})
1312
return markdownAST
1413
}

theme/src/style/mermaid.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
.node .label {
2222
text-align: center;
23+
text-anchor: middle;
2324
}
2425

2526
.node.clickable {
@@ -49,6 +50,7 @@
4950
.cluster > .label {
5051
fill: #2e2e2e;
5152
color: #2e2e2e;
53+
text-align: center;
5254
}
5355

5456
div.mermaidTooltip {
@@ -206,8 +208,6 @@ text.actor {
206208
.sectionTitle {
207209
text-anchor: start;
208210
font-size: 11px;
209-
text-height: 14px;
210-
211211
font-family: var(--mermaid-font-family);
212212
}
213213

@@ -577,6 +577,7 @@ g.stateGroup line {
577577
.label {
578578
font-family: var(--mermaid-font-family);
579579
color: #ffbb00;
580+
font-size: 12px;
580581
}
581582

582583
.label text {

0 commit comments

Comments
 (0)