Bug reportAug 22, 2026· 0:40· 14 views
Mermaid 11.16: themeCSS silently dropped when it contains a > (child combinator)
0:40 total
Comments · 0
Be the first to comment.
Bug report— by SceneRecap AI
mediumrenderer/theme-parser
os: macOSapp: Mermaid Live Editor v11.16.1browser: Chromium 151.0.7922.34viewport: 1280x720
Repro steps
- 1.Open Mermaid Live Editor and access the code editor.
- 2.Define a flowchart diagram with frontmatter config containing valid CSS in `themeCSS` (e.g. styling cluster backgrounds and node labels).
- 3.Observe that the custom CSS styles render properly (control case).
- 4.Update `themeCSS` in the frontmatter configuration to include a selector with a CSS child combinator (`>`).
- 5.Observe the rendered diagram preview.
Expected
The CSS rules containing child combinators (`>`) in `themeCSS` should be parsed and applied to the diagram elements, or a syntax/compilation error should be reported.
Actual
All `themeCSS` styles are silently dropped, reverting the diagram rendering to default styles without any error notification.
Evidence
visualControl case: Diagram renders with custom themeCSS applied (pink subgraph background and styled text).
visualFailing case: Subgraph pink background styling and custom themeCSS are dropped immediately after updating the config with a child combinator (`>`).
Issue markdown (copy-paste ready)
## Description In Mermaid Live Editor (v11.16.1), providing CSS in `themeCSS` that includes a CSS child combinator (`>`) causes all custom `themeCSS` styles to be silently discarded. The diagram renders with default styling instead of applying the custom CSS, and no error message is displayed. ## Repro Steps 1. Open Mermaid Live Editor. 2. In the code editor, supply a diagram with `themeCSS` in the frontmatter config that includes a child combinator (`>`). 3. Observe the diagram preview. ## Expected Result Child combinator selectors in `themeCSS` should be properly parsed and applied to the diagram elements. ## Actual Result The `themeCSS` is silently dropped and the diagram renders with default styles. *Recorded with SceneRecap.*
Your recordings could explain themselves too.
Free plan · silent recordings welcome · bug reports included.
Try SceneRecap free →