Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW FEATURE] - @theguild/remark-mermaid to support mermaidConfig as parameter #1264

Open
LunaticMuch opened this issue Oct 3, 2023 · 4 comments

Comments

@LunaticMuch
Copy link

I am using Nextra and mermaid diagrams, which are great. However, to make the diagram fit into my needs, I always need to add to any diagram some init configuration, example

%%{
  init: {
    'themeVariables': {
      'fontFamily': 'trebuchet ms, verdana, arial',
      'fontSize': '14px'
    }
  }
}%%

I think it would be good if the plugin a mermaidConfig as variable

@dimaMachina
Copy link
Collaborator

Hey! I think specifying font can be done via css? https://mermaid.js.org/config/usage.html#labels-out-of-bounds

@LunaticMuch
Copy link
Author

For that particular case, yes...which is also my main one. Let me try to how I can feed it in from Tailwind config

@dimaMachina
Copy link
Collaborator

Hi @LunaticMuch did you succeed, or do you still need this option?

@LunaticMuch
Copy link
Author

@B2o5T I would say yes. I did some tests but all failed. I suspect the diagram is rendered before/without reading the mermaid css config you can put in Nextra/Next.JS and therefore whichever change you put there is just not effective

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants