Skip to content

Commit

Permalink
Merge pull request #5640 from ScriptBloom/docs/5639_optimize-state-di…
Browse files Browse the repository at this point in the history
…agram-example-display

docs: fix the classDef example in stateDiagram not display as code block, and long text display overflows
  • Loading branch information
sidharthv96 authored Jul 13, 2024
2 parents 7afff87 + 84b5179 commit 4bb75e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/syntax/stateDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
classDef movement font-style:italic;
```txt
classDef movement font-style:italic;
```

where
Expand All @@ -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:

```
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```txt
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```

where
Expand All @@ -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:

```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`:
Expand Down
10 changes: 5 additions & 5 deletions packages/mermaid/src/docs/syntax/stateDiagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
classDef movement font-style:italic;
```txt
classDef movement font-style:italic;
```

where
Expand All @@ -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:

```
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```txt
classDef badBadEvent fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
```

where
Expand All @@ -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:

```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`:
Expand Down

0 comments on commit 4bb75e5

Please sign in to comment.