Some small interim changes, adding theming.doc

This commit is contained in:
Knut Sveidqvist
2020-07-24 08:25:57 +02:00
parent dbda90b15b
commit c5b55fa476
10 changed files with 8036 additions and 25212 deletions

View File

@@ -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
View 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