Rectangle with sub entries uses different font style/color?

0 votes
asked Jan 3, 2021 in Question / help by kirchsth (4,980 points)

Hello PlantUML team, can you help me?

If I uses rectangles with sub rectangles then a different font style (bold) and stereotype color is used.
Do I have to use additional skinparams? (rectangle with sub rectangle: stereotyp should be white and text not bold)

@startuml
skinparam rectangle<<container>> {
    StereotypeFontColor #FFFFFF
    FontColor #FFFFFF
    BackgroundColor #438DD5
    BorderColor #3C7FC0
}

rectangle "API Application\nProvides Internet Banking\nfunctionality via a\nJSON/HTTPS API." <<container>> as api {
}

rectangle "Web Application\nDelivers the static\ncontent and the Internet\nBanking single page\napplication." <<container>> as web {
    rectangle web_prop <<properties>> [
        Table web_prop...
    ]
}
@enduml

Thank you and best regards
Helmut

1 Answer

0 votes
answered Feb 3, 2021 by The-Lu (64,760 points)
selected Mar 5, 2021 by kirchsth
 
Best answer

Hello K.,

If I uses rectangles with sub rectangles then a different font style (bold) and stereotype color is used.
Do I have to use additional skinparams? (rectangle with sub rectangle: stereotype should be white and text not bold)

Yes, for that, you must add this additional skinparam:

skinparam package<<container>> {
    StereotypeFontColor #FFFFFF
    FontStyle plain
}

Because in skinparams speaking, if a rectangle is nested, it becomes a package(heritage of class diagram) wink

Here is the expected result:


[See on PlantUML online server]

Enjoy,
If that can help,
Regards,
Th.

commented Mar 4, 2021 by kirchsth (4,980 points)
Hi Th.

thank you for the clarification, now I can fix the C4-PlantUML implementation.

Best regards
Helmut
...