Skip to content
Limited Time 30% off Mermaid Studio — Get discount →

Style Pane

Last updated:

The Style Pane is one part of Mermaid Studio’s visual editing workflow. It is a property inspector in the Mermaid Studio tool window that lets you view and edit CSS styling for diagram elements without writing style or classDef lines by hand.

The controls the Style Pane shows depend on the active diagram type. Each supported diagram type has its own section on its diagram-type page covering the controls available there:

Support for additional diagram types will be added in future releases.

The Style Pane appears as a Style tab in the Mermaid Studio tool window, typically docked on the right side of the IDE. Click the tab to switch to it.

Place your caret on a styleable element in the editor, or click the element directly in the live preview. The Style Pane tracks your selection and displays the properties for the element under the caret.

When a styleable element is selected, the header shows the element’s icon (matching the structure view), name, and label (if any).

Once an element is selected, the selection stays pinned through editor focus changes, caret movements off the element, and unrelated text edits. The pane no longer rebuilds or loses its active mode selector on every keystroke, and it refreshes after edits from the formatter, an inspection quick fix, or other non-typing edit paths.

Renaming a selected element follows through to the pane header and the preview highlight automatically; the selection clears only when the element is actually deleted.

The same pinning, rename following, and edit-driven refresh apply to Mermaid diagrams embedded in Markdown code fences.

Properties are organized into collapsible groups. Color properties display a swatch next to the value; click the swatch to open the color picker. Dropdown properties like font-size and stroke-dasharray offer predefined values but also accept custom input.

PropertyDescription
fillBackground color
strokeBorder color
stroke-widthBorder thickness
stroke-dasharrayBorder dash pattern (solid, dashed, dotted)
fill-opacityBackground transparency (0 to 1)
stroke-opacityBorder transparency (0 to 1)
PropertyDescription
colorText color
font-sizeText size
font-weightText weight (normal, bold, or numeric 100-900)
font-familyFont face (generic or specific)
font-styleNormal, italic, or oblique
PropertyDescription
rxCorner radius (horizontal)
ryCorner radius (vertical)

The Other section is collapsible and accepts arbitrary CSS properties beyond the built-in groups.

PropertyDescription
opacityOverall element transparency (0 to 1)
cursorCSS cursor style
visibilityVisible, hidden, or collapse

The Style Pane shows where each property value comes from.

  • Inline styles — From style A fill:#f9f statements. These have the highest precedence. When a property has a value to remove, the row shows an X button whose tooltip names the specific property (for example Remove Fill); the button hides itself when there’s nothing to remove.
  • Class definitions — From a classDef applied via class A myClass or A:::myClass. These show a source badge with the class name. Click the badge to navigate to the class definition, or click the unlink button to remove the class association.
  • linkStyle declarations — From linkStyle 0 stroke:#f00 statements targeting the selected link by index.

When the same property is set in both a class and an inline style, the inline style takes precedence.

All Style Pane changes integrate with the IDE’s undo system. Press Command + Z Control + Z to revert a change.