mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-07 01:26:42 +02:00
@@ -660,14 +660,27 @@ It is also possible to attach a class to a list of nodes in one statement:
|
|||||||
|
|
||||||
A shorter form of adding a class is to attach the classname to the node using the `:::` operator:
|
A shorter form of adding a class is to attach the classname to the node using the `:::` operator:
|
||||||
|
|
||||||
```mmd
|
```mermaid-example
|
||||||
|
classDiagram
|
||||||
|
class Animal:::cssClass
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid
|
||||||
classDiagram
|
classDiagram
|
||||||
class Animal:::cssClass
|
class Animal:::cssClass
|
||||||
```
|
```
|
||||||
|
|
||||||
Or:
|
Or:
|
||||||
|
|
||||||
```mmd
|
```mermaid-example
|
||||||
|
classDiagram
|
||||||
|
class Animal:::cssClass {
|
||||||
|
-int sizeInFeet
|
||||||
|
-canEat()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```mermaid
|
||||||
classDiagram
|
classDiagram
|
||||||
class Animal:::cssClass {
|
class Animal:::cssClass {
|
||||||
-int sizeInFeet
|
-int sizeInFeet
|
||||||
|
@@ -393,44 +393,6 @@ Let see an example:
|
|||||||
commit id:"C"
|
commit id:"C"
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, the cherry-picked commit from commit with id `A` will be labeled `cherry-pick:A`. You can provide your own custom tag instead to override this behavior, using the same syntax as the `commit` keyword:
|
|
||||||
|
|
||||||
```mermaid-example
|
|
||||||
gitGraph
|
|
||||||
commit id: "ZERO"
|
|
||||||
branch develop
|
|
||||||
commit id:"A"
|
|
||||||
checkout main
|
|
||||||
commit id:"ONE"
|
|
||||||
checkout develop
|
|
||||||
commit id:"B"
|
|
||||||
checkout main
|
|
||||||
commit id:"TWO"
|
|
||||||
cherry-pick id:"A" tag:"fix"
|
|
||||||
commit id:"THREE"
|
|
||||||
checkout develop
|
|
||||||
commit id:"C"
|
|
||||||
```
|
|
||||||
|
|
||||||
```mermaid
|
|
||||||
gitGraph
|
|
||||||
commit id: "ZERO"
|
|
||||||
branch develop
|
|
||||||
commit id:"A"
|
|
||||||
checkout main
|
|
||||||
commit id:"ONE"
|
|
||||||
checkout develop
|
|
||||||
commit id:"B"
|
|
||||||
checkout main
|
|
||||||
commit id:"TWO"
|
|
||||||
cherry-pick id:"A" tag:"fix"
|
|
||||||
commit id:"THREE"
|
|
||||||
checkout develop
|
|
||||||
commit id:"C"
|
|
||||||
```
|
|
||||||
|
|
||||||
To suppress the tag entirely, use `tag:""` (empty string).
|
|
||||||
|
|
||||||
## Gitgraph specific configuration options
|
## Gitgraph specific configuration options
|
||||||
|
|
||||||
In Mermaid, you have the option to configure the gitgraph diagram. You can configure the following options:
|
In Mermaid, you have the option to configure the gitgraph diagram. You can configure the following options:
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||||
/>
|
/>
|
||||||
|
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> -->
|
||||||
<link rel="stylesheet" href="theme.css" />
|
<link rel="stylesheet" href="theme.css" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
|
Reference in New Issue
Block a user