Skip to content

The div padding breaks mindmap rendering #5121

Open
@sowillwe

Description

Description

I meant to set padding for divs with the div selector. But this breaks the mindmap rendering.
This should not happen as the div selector has a low priority.

Steps to reproduce

Simply load the code sample page.

Screenshots

No response

Code Sample

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* 0 padding would be OK */
            padding: 0.5em;
        }
    </style>
</head>

<body>
    <!-- fails to render mindmap -->
    <!-- other diagram types seem to be OK -->
    <pre class="mermaid">
        mindmap
            root((mindmap))
    </pre>
    <script type="module">
        import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'
        mermaid.initialize({ startOnLoad: true });
    </script>
</body>

</html>

Setup

mermaid@10
Microsoft Edge 119.0.2151.97

Suggested Solutions

No response

Additional Context

No response

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions