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

Styling: classes aren't applied to elements. #582

Closed
joostas opened this issue Oct 1, 2017 · 9 comments

Comments

@joostas
Copy link

commented Oct 1, 2017

Styling: classDef and classes aren't applied to elements.
Example:

graph TD
A-->B
C-->D
classDef def fill:#00f
class A def

Element A is green, but should be blue.

@BiteBit

This comment has been minimized.

Copy link

commented Dec 3, 2017

I have the some issue.

@aaroncalderon

This comment has been minimized.

Copy link

commented Dec 7, 2017

It's weird, because the demo: Larger flowchart with some styling works, but it does not when I try the same thing on the live editor.

Any Ideas?

@marceloboeira

This comment has been minimized.

Copy link

commented Jan 11, 2018

@aaroncalderon same here...

@ghost

This comment has been minimized.

Copy link

commented Feb 28, 2018

Same here. I am being able to style each node individually:

screenshot_2

But when I try doing it with classDef nothing happens:

screenshot_1

Naming it default does nothing as well:

screenshot_3

@cryodream

This comment has been minimized.

Copy link

commented Mar 5, 2018

I spent hours trying to get this to work in VS Code.
Hope it'll get fixed, because defining styles individually is a pita.

@calve

This comment has been minimized.

Copy link

commented Mar 5, 2018

Same here. Looking at the generated HTML, nodes do get classes attributes, but I cannot find any css rules matching the class, nor find any occurence of my classname in the generated document. I believe there is a bug preventing the CSS rules to be set.

This regression seems to appear between releases 7.0.14 and 7.0.15 which lead me to commit 72493b7.

   graph TD

     hello --> world;
     classDef someclass fill:#f96;
     class hello someclass;

Please note that the ordering do matter. Also this is processed by sphinx-mermaid but this is not relevant here.

Before (7.0.14) screenshot_20180305_204032

After (7.0.15) screenshot_20180305_202955

@tylerlong would be glad if you could shed us some light on this ? 🙃

@tylerlong

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2018

Hi guys, I am here. I will take a look tonight.

@calve thank you for figuring out the commit which brought this regression.

@tylerlong

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2018

Fixed: a8e49a0...0d0f793

image

@tylerlong tylerlong closed this Mar 14, 2018

@marceloboeira

This comment has been minimized.

Copy link

commented Mar 14, 2018

@tylerlong thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.