mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-25 03:06:50 +02:00
docs: fix the classDef example in stateDiagram not display as code block, and long text display overflows
This commit is contained in:
@@ -483,8 +483,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by
|
|||||||
|
|
||||||
Here is an example of a classDef with just one property-value pair:
|
Here is an example of a classDef with just one property-value pair:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
classDef movement font-style:italic;
|
classDef movement font-style:italic;
|
||||||
```
|
```
|
||||||
|
|
||||||
where
|
where
|
||||||
@@ -496,8 +496,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`,
|
|||||||
|
|
||||||
Here is an example with three property-value pairs:
|
Here is an example with three property-value pairs:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
||||||
```
|
```
|
||||||
|
|
||||||
where
|
where
|
||||||
@@ -522,7 +522,7 @@ There are two ways to apply a `classDef` style to a state:
|
|||||||
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
|
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
||||||
```
|
```
|
||||||
|
|
||||||
Here is an example applying the `badBadEvent` style to a state named `Crash`:
|
Here is an example applying the `badBadEvent` style to a state named `Crash`:
|
||||||
|
@@ -288,8 +288,8 @@ a _[valid CSS property name](https://www.w3.org/TR/CSS/#properties)_ followed by
|
|||||||
|
|
||||||
Here is an example of a classDef with just one property-value pair:
|
Here is an example of a classDef with just one property-value pair:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
classDef movement font-style:italic;
|
classDef movement font-style:italic;
|
||||||
```
|
```
|
||||||
|
|
||||||
where
|
where
|
||||||
@@ -301,8 +301,8 @@ If you want to have more than one _property-value pair_ then you put a comma (`,
|
|||||||
|
|
||||||
Here is an example with three property-value pairs:
|
Here is an example with three property-value pairs:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
|
||||||
```
|
```
|
||||||
|
|
||||||
where
|
where
|
||||||
@@ -327,7 +327,7 @@ There are two ways to apply a `classDef` style to a state:
|
|||||||
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
|
A `class` statement tells Mermaid to apply the named classDef to one or more classes. The form is:
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
class [one or more state names, separated by commas] [name of a style defined with classDef]
|
||||||
```
|
```
|
||||||
|
|
||||||
Here is an example applying the `badBadEvent` style to a state named `Crash`:
|
Here is an example applying the `badBadEvent` style to a state named `Crash`:
|
||||||
|
Reference in New Issue
Block a user