Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

classDef / class not working with htmlLabels? #210

Closed
Daijobou opened this issue Sep 21, 2015 · 3 comments
Closed

classDef / class not working with htmlLabels? #210

Daijobou opened this issue Sep 21, 2015 · 3 comments
Milestone

Comments

@Daijobou
Copy link

With HTML in node this code not add class to node:

    graph LR;
        A-->B[AAA<span>BBB</span>];
        B-->D;
        classDef test fill:#FF0000,stroke:#FFFF00,stroke-width:4px;
        class A test;

Remove

<span>BBB</span>

in "B" and its working fine. Is this a bug or my mistake?

@knsv
Copy link
Collaborator

knsv commented Sep 21, 2015

I can reproduce this. Will dig further. Thinking the styling maybe should move out to css in the long run.

test could already be defined as below in a local stylesheet or similar:

        g .test rect{
            fill:#FF0000;
            stroke-width:4px;
        }
        g .test text{
            fill: #FFFF00 !important;
        }
    graph LR;
        A-->B[AAA<span>BBB</span>];
        B-->D;
        class A test;

knsv added a commit that referenced this issue Sep 26, 2015
…how to predefine classes in the css and set them from the graph definition.
knsv added a commit that referenced this issue Sep 26, 2015
…how to predefine classes in the css and set them from the graph definition.
@knsv
Copy link
Collaborator

knsv commented Sep 26, 2015

Found the issue and fixed it. Also added some documentation on how to predefine classes in the css and set them from the graph definition.

This can be viewed here under the heading Css classes:
http://knsv.github.io/mermaid/#styling-and-classes

@knsv knsv added the Fixed label Sep 26, 2015
@knsv knsv added this to the 0.5.2 milestone Oct 4, 2015
@knsv
Copy link
Collaborator

knsv commented Oct 4, 2015

Fix for this issue was released in mermaid 0.5.2. Will close this now, let me know if you issues still remain.

@knsv knsv closed this as completed Oct 4, 2015
mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
…yarn/develop/cssnano-5.0.6

Bump cssnano from 5.0.5 to 5.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants