How do I apply skinparam to cards that have nested members?

0 votes
asked Jun 23, 2023 in Question / help by May-snow
I want to apply skinparam or style to cards that have nested members.

Following is my code.Card1 font color is red and font style is regular, but Card2 that have nested member font color is black and font style is bold.(I use VSCode in Windows10 PC.)

Can I change font color and style with cards have nasted member?

---

@startuml CardTest
<style>
object {
 LineColor #transparent
 BackgroundColor #LightSkyBlue

 header {
    BackgroundColor RoyalBlue
    FontStyle bold
  }
}
</style>

skinparam card{
  FontStyle regular
  FontColor red
}

card card1 [
    This is
    == CARD1
]

card card2 as "CARD2" #TECHNOLOGY;line:TECHNOLOGY;{
    object "TEST" as test1
    test1 : member1
}
@enduml
commented Jun 26, 2023 by The-Lu (64,760 points)

Hi M.,

  • What is your plantuml version?

FYI, here the 2 outputs with the last version:

CodeOutput
@startuml CardTest
<style>
object {
 LineColor #transparent
 BackgroundColor #LightSkyBlue

 header {
    BackgroundColor RoyalBlue
    FontStyle bold
  }
}
</style>

skinparam card{
  FontStyle regular
  FontColor red
}

card card1 [
    This is
    == CARD1
]

card card2 as "CARD2" #TECHNOLOGY;line:TECHNOLOGY;{
    object "TEST" as test1
    test1 : member1
}
@enduml
@startuml CardTest
<style>
object {
 LineColor #transparent
 BackgroundColor #LightSkyBlue

 header {
    BackgroundColor RoyalBlue
    FontStyle bold
  }
}

card {
  FontStyle regular
  FontColor red
}
</style>

card card1 [
    This is
    == CARD1
]

card card2 as "CARD2" #TECHNOLOGY;line:TECHNOLOGY;{
    object "TEST" as test1
    test1 : member1
}
@enduml

Regards.

1 Answer

0 votes
answered Jun 27, 2023 by May-snow
Dear The-Lu,

Thank you for your detailed reply.
I use PlantUML extention v2.17.5 with VS Code.
I understand that in the latest version it is fixed.
I would like to try updating the extention.

Kind Regards.
...