Styles in activity diagram

0 votes
asked Mar 28, 2023 in Question / help by Plotter7

I initialize styles with:

skinparam useBetaStyle true
<style>
    ' scope to sequenceDiagram elements
   activityDiagram {
     ' define a new style, using CSS class syntax
     .stBR {
        FontColor Red
        FontStyle Bold
     }
     ' define a new style, using CSS class syntax
     .stBUR {
        FontColor Green
     }
   }
</style>

and use it:

:- Action_ChangeFormulasAdditional <<stBR>> 123 <</stBR>>]

As a result I get:

"<<stBR>> 123 <</stBR>>" instead of  123

How to fix it?

1 Answer

0 votes
answered Mar 28, 2023 by The-Lu (64,340 points)

Hello P., and all,

For your case (local style, not on the full line...) use preferentially procedure like:

@startuml
!procedure stBR($str)
  <b><color:red>$str</color></b>
!endprocedure

:- Action_ChangeFormulasAdditional stBR(123) ]
@enduml

Enjoy,
Regards.

commented Mar 29, 2023 by Plotter7

Thank you, The_Lu!

It works.

...