mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 15:59:51 +02:00
Some small interim changes, adding theming.doc
This commit is contained in:
@@ -839,7 +839,6 @@ Sets the siteConfig. The siteConfig is a protected configuration for repeat use.
|
||||
the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig
|
||||
to the defaultConfig
|
||||
Note: currentConfig is set in this function
|
||||
|
||||
\*Default value: At default, will mirror Global Config\*\*
|
||||
|
||||
### Parameters
|
||||
|
24
docs/theming.md
Normal file
24
docs/theming.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Theming
|
||||
|
||||
Mermaid as a system for theming in place. With it a site integrator can override a vast majority of attributes used when rendering a diagram.
|
||||
|
||||
The settings for a thime can be set globally for the site with the initialize call. The example below highlights how that can look:
|
||||
|
||||
```
|
||||
// example
|
||||
```
|
||||
|
||||
It is also possible to override theme settings locally in a diagram using directives.
|
||||
|
||||
```
|
||||
// example
|
||||
```
|
||||
|
||||
The easiest way to make a custom theme is to start with the base theme, the theme named base and just modify these three variables:
|
||||
* primaryColor - the base color for the theme
|
||||
* secondaryColor - A compliment color to the primary color. This color is made lighter and used as background in subgraphs for instance
|
||||
|
||||
More specific color variables it is åpossible to change:
|
||||
* lineColor
|
||||
* textColor
|
||||
|
Reference in New Issue
Block a user