DiagramStyle Class
The look of an element of a diagram, the CSS properties of the style and classDef statements of Mermaid. A property that is null keeps the value of the theme.
public sealed class DiagramStyle : IEquatable<DiagramStyle>- Implements
Constructors
| Name | Description |
|---|---|
| DiagramStyle() |
DiagramStyle()
public DiagramStyle()No documentation is available.
Properties
| Name | Description |
|---|---|
| Bold | Gets a value that indicates whether the text is bold (CSS font-weight). |
| Fill | Gets the color of the interior (CSS fill). |
| FontSize | Gets the size of the text, in pixels (CSS font-size). |
| Italic | Gets a value that indicates whether the text is italic (CSS font-style). |
| Opacity | Gets the opacity of the element, from 0 to 1 (CSS opacity). |
| Stroke | Gets the color of the outline, or of the line of an edge (CSS stroke). |
| StrokeDashArray | Gets the lengths of the dashes and gaps of the outline, or an empty list for a solid outline (CSS stroke-dasharray). |
| StrokeWidth | Gets the width of the outline, or of the line of an edge (CSS stroke-width). |
| TextColor | Gets the color of the text (CSS color). |
Bold
DiagramStyle.csFill
DiagramStyle.csFontSize
DiagramStyle.csItalic
DiagramStyle.csOpacity
DiagramStyle.csStroke
DiagramStyle.csGets the color of the outline, or of the line of an edge (CSS stroke).
public SceneColor? Stroke { get; init; }Property value
StrokeDashArray
DiagramStyle.csGets the lengths of the dashes and gaps of the outline, or an empty list for a solid outline (CSS stroke-dasharray).
public IReadOnlyList<double>? StrokeDashArray { get; init; }Property value
StrokeWidth
DiagramStyle.csTextColor
DiagramStyle.csMethods
| Name | Description |
|---|---|
| Equals(DiagramStyle?) | |
| Equals(object?) | |
| GetHashCode() | |
| Merge(DiagramStyle?) | Returns a style whose properties are the ones of other when they are set, and the ones of this style otherwise. |
| ToString() |
Equals overloads
Equals(DiagramStyle?)
public bool Equals(DiagramStyle? other)No documentation is available.
Equals(object?)
GetHashCode()
Merge(DiagramStyle?)
DiagramStyle.csReturns a style whose properties are the ones of other when they are set, and the ones of this style otherwise.
public DiagramStyle Merge(DiagramStyle? other)Parameters
otherDiagramStyle?- The style that takes precedence, or
null.
Returns
DiagramStyle The combined style.
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(DiagramStyle?, DiagramStyle?) | |
| operator !=(DiagramStyle?, DiagramStyle?) |
operator ==(DiagramStyle?, DiagramStyle?)
public static bool operator ==(DiagramStyle? left, DiagramStyle? right)No documentation is available.
operator !=(DiagramStyle?, DiagramStyle?)
public static bool operator !=(DiagramStyle? left, DiagramStyle? right)No documentation is available.