Good question. This is an on-going need.
Here are some answers from the forum & from stackoverflow:
- Using node attributes in HTML style label
- graphviz - Set pre-defined node styles? - Stack Overflow
- How can I create named edge "types" in Graphviz/dot/neato? - Stack Overflow
-
flowchart - Can you build reusable styles in GraphViz? - Stack Overflow
And future solutions: - [Other] [New Feature Request] Add a CSS-like "class" attribute (#694) · Issues · graphviz / graphviz · GitLab
- Styles for GraphViz (#1566) · Issues · graphviz / graphviz · GitLab
- [Other] Classes for more layout less code (#673) · Issues · graphviz / graphviz · GitLab