Open kawikao opened 7 years ago
Very nice idea. Should we use "actorVistor" instead of "actor0"? I guess number based has fewer pitfalls.
I wonder if the CSS nth select would have worked without your change, for example:
.actor rect:nth-child(1), .actor path:nth-child(1) {
fill: #f9f;
}
Well either way I'll review your changes shortly.
I couldn't get .actor:nth-child() or .actor:nth-of-type() to work but I did get it to work with group. One nice side-effect is it's possible to address each box seperately (e.g. top and bottom of the same actor). The downside is having to set both boxes.
Uses group
g:nth-of-type(2) rect
Or a more specific call to group.class
g.actor:nth-of-type(2) rect
Allows CSS attributes to override individual actors.
Example to be used in
sequence-diagram.css
: