Add support for themes in mermaid#22
Open
Wiskerke wants to merge 2 commits intosilverbulletmd:mainfrom
Open
Conversation
Also includes a small fix that the click event triggers a refocus of the editor.
That was not supposed to be part of the pull request
Author
|
I am wondering a bit if I'm not making it too big here. I like the whole package, but it does make this plug less suitable as an example plug. @zefhemel : If you like I could create a pull request that only supports the 'theme' and 'theme_darkmode' from the settings. I think that is sort of the minimum to make it useful for darkmode. I do like the fillBackground option, but that is the main feature that adds the complexity. As fillBackground is something that makes sense only to enable on some diagrams (and then you'd need frontmatter parsing), and then it is really nice to be able to configure the background color... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
This merge request mainly adds support for configuring themes, with improved support for darkmode. (I mainly use darkmode and the default experience with the silverbullet-mermaid plug is not great. And with these changes you can at least configure it with better alternatives.)
I've updated the readme.md (and the plug has the same copy pasted content) with the explanation of how the theming works.
In addition there are a couple of small refactorings / fixes:
config?..