Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit c697c95

Browse files
committed
nitric diagram styling wip
1 parent 07ed8d2 commit c697c95

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

src/mdx/remark.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ export const remarkPlugins = [
1313
theme: 'base',
1414
// TODO: Relocate theme config
1515
themeVariables: {
16-
primaryColor: '#242037',
17-
lineColor: '#cad3f5',
18-
secondaryColor: '#42424a',
16+
background: 'white',
17+
primaryColor: '#F9F3FF',
18+
primaryBorderColor: 'var(--secondary-300)',
19+
lineColor: '#000000',
20+
secondaryColor: '#ffffff',
1921
tertiaryColor: '#0000ff',
20-
primaryTextColor: '#cad3f5',
21-
fontSize: '14px',
22-
fontFamily: 'Fira Code, monospace',
22+
primaryTextColor: '#000000',
23+
fontSize: '24px', // use with styles in mermaid.css, this zooms out the diagram
24+
fontFamily: 'var(--font-jetbrains-mono), monospace',
2325
},
2426
},
2527
},

src/styles/mermaid.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
svg[id^='mermaid-svg-'] {
2-
display: block;
3-
/* width: 100%; */
4-
margin: auto;
5-
/* padding: 0; */
2+
@apply mx-auto block rounded-lg bg-white p-4;
3+
}
4+
5+
svg[id^='mermaid-svg-'] .nodeLabel,
6+
svg[id^='mermaid-svg-'] .edgeLabel,
7+
svg[id^='mermaid-svg-'] tspan {
8+
@apply text-base;
9+
}
10+
11+
svg[id^='mermaid-svg-'] .edgeLabel {
12+
@apply py-1;
613
}

0 commit comments

Comments
 (0)