Hello all,
How to use different style for different ref element?
Now (from 1.2019.9++) with new style functionality, we can change style during sequence as:
@startuml
<style>
sequenceDiagram {
reference {
LineColor red
BackGroundColor yellow
LineThickness 2.0
}
referenceHeader {
LineColor red
BackGroundColor blue
FontStyle bold
}
}
</style>
Dummy -> Alice : foo1
ref over Alice, Bob : this is a reference over Alice and Bob
ref#7700FF over Alice, Other, Bob : this is a reference over Alice and Other
Other --> Alice : ok again
Alice -> Bob : new style
<style>
sequenceDiagram {
reference {
LineColor blue
BackGroundColor palegreen
}
referenceHeader {
LineColor blue
BackGroundColor green
FontColor white
}
}
</style>
ref over Alice, Bob : this is another1 reference over Alice and Bob
Alice <- Bob : another new style
<style>
sequenceDiagram {
reference {
LineColor red
BackGroundColor pink
}
referenceHeader {
LineColor red
BackGroundColor blue
}
}
</style>
ref over Alice, Bob : this is another2 reference over Alice and Bob
@enduml
[See on PlantUML online server]
If that can help,
Regards,
Th.