Skip to content

Commit

Permalink
nitric diagram styling wip
Browse files Browse the repository at this point in the history
some sequence diagrams now have overlapping text due to font
  • Loading branch information
davemooreuws committed Feb 7, 2025
1 parent 07ed8d2 commit d57f6b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
14 changes: 8 additions & 6 deletions src/mdx/remark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ export const remarkPlugins = [
theme: 'base',
// TODO: Relocate theme config
themeVariables: {
primaryColor: '#242037',
lineColor: '#cad3f5',
secondaryColor: '#42424a',
background: 'white',
primaryColor: '#F9F3FF',
primaryBorderColor: 'var(--secondary-300)',
lineColor: '#000000',
secondaryColor: '#ffffff',
tertiaryColor: '#0000ff',
primaryTextColor: '#cad3f5',
fontSize: '14px',
fontFamily: 'Fira Code, monospace',
primaryTextColor: '#000000',
fontSize: '24px', // use with styles in mermaid.css, this zooms out the diagram
fontFamily: 'var(--font-jetbrains-mono), monospace',
},
},
},
Expand Down
15 changes: 11 additions & 4 deletions src/styles/mermaid.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
svg[id^='mermaid-svg-'] {
display: block;
/* width: 100%; */
margin: auto;
/* padding: 0; */
@apply mx-auto block rounded-lg bg-white p-4;
}

svg[id^='mermaid-svg-'] .nodeLabel,
svg[id^='mermaid-svg-'] .edgeLabel,
svg[id^='mermaid-svg-'] tspan {
@apply text-base;
}

svg[id^='mermaid-svg-'] .edgeLabel {
@apply py-1;
}

0 comments on commit d57f6b7

Please sign in to comment.