Custom css classes for classDiagram nodes
See original GitHub issueHi, I’m trying to create bigger models and want to have different colored elements for different types of nodes in my class diagram.
For example, in the next image I would like the Student
to be colored orange.
In order to do this I’d like to add a custom css class to my model and style the svg accordingly. Is this possible?
If not, the <<something>>
notation seems a perfect way of adding a classifier to the resulting SVG.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Use styles with CSS - PlantUML
You can use CSS in some diagrams to change colors and fonts.
Read more >Styling and Theming | The Official Guide to Mermaid.js
Styling a specific class of a class diagram. In Mermaid, it is possible to supply your own custom CSS styles and apply them...
Read more >Does a Class Diagram for CSS make sense? - Stack Overflow
I have CSS classes defined for HTML page. now i want to create UML class diagram for the these classes. so what strategy...
Read more >The Beginner's Guide to CSS Classes - HubSpot Blog
CSS classes help you customize elements on a web page faster and more easily. Using CSS class selectors allows you to set up...
Read more >Class diagrams - GitHub Pages
The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For class diagrams the only way to modify the styling is via the steps outlined in documentation here: http://mermaid-js.github.io/mermaid/#/classDiagram?id=styling
Right now it is not possible to set custom styles for specific/discrete class diagram entities.
This is possible for other diagrams, and that functionality could be ported over from somewhere like how flowchart diagram handles this
The problem that I have run into with implementing styling is related to the way that members are defined for classes. The use of
:
between the class name and member means that the parser thinks you are trying to define this relationship when it gets to the class definition.As you said, I want to keep the implementation the same as it is being used with other diagrams…
Ive been on “hiatus” from the project the past month or so to deal with other issues. You know, just some random things going on with family, the world, whatever 😉
Im getting ready to start up again, and this is one of the main issues I intend to come back to