From b92b344844256287f038c7455210ca8546f9f308 Mon Sep 17 00:00:00 2001 From: jgreywolf Date: Sun, 10 Dec 2023 21:28:26 +0000 Subject: [PATCH] Update docs --- docs/syntax/classDiagram.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/syntax/classDiagram.md b/docs/syntax/classDiagram.md index b2d5a8c89..e60055413 100644 --- a/docs/syntax/classDiagram.md +++ b/docs/syntax/classDiagram.md @@ -242,7 +242,7 @@ class BankAccount{ Members can be defined using generic types, such as `List`, for fields, parameters, and return types by enclosing the type within `~` (**tilde**). **Nested** type declarations such as `List>` are supported. -Generics can be represented as part of a class definition and also in the parameters or the return value of a method/function: +Generics can be represented as part of a class definition and also in the parameters or the return value of a method/function (note that any references to the class later in diagram code is used without the type ) ```mermaid-example classDiagram @@ -786,6 +786,22 @@ classDiagram style Mineral fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5 ``` +```mermaid-example +classDiagram + class Animal + class Mineral + style Animal fill:#f9f,stroke:#333,stroke-width:4px + style Mineral fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5 +``` + +```mermaid +classDiagram + class Animal + class Mineral + style Animal fill:#f9f,stroke:#333,stroke-width:4px + style Mineral fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5 +``` + #### Classes More convenient than defining the style every time is to define a class of styles and attach this class to the nodes that