Is it possible to create its own stylesheet in PlantUML code?
I've looked at skinparam, but haven't completely find a way (v7988).
I'm not asking for CSS
, just something like the following.
Let's say in a component diagram, I have 2 kinds of component, for example a static library and a shared library.
I like PlantUML because it's a WYSIWYM processor. So when I create a library component, I only want to flag it as static_lib or shared_lib, and set the color, font, etc. later, once. So later on, a stylesheet (skinparam?) can be applied to every component flagged.
It looks like there's an under advertised feature with stereotyped skinparam, mentioned in the component's skinparam example and SkinnedStereotypes. (a reference in skinparam.html would be great). Nothing found in reference guide v5737.
The following works as expected:
@startuml
[AA] <<static lib>>
[BB] <<shared lib>>
[CC] <<static lib>>
[Leave me alone] << other lib >>
skinparam component {
backgroundColor<<static lib>> Red
backgroundColor<<shared lib>> Green
}
@enduml
However, it looks like I can't skinparam a package/node/folder/frame/cloud/database/interface. What about actor/boundary/control/entity ?
They are not listed in skinparam.html either. Is it all a matter of introducing that bunch of params?
packageBackgroundColor, packageFontName, etc.
Regarding package, won't I run into trouble with predefined stereotypes <<Node>>, <<Rect>>, <<Folder>>, <<Frame>>, <<Cloud>>, <<Database>> ? ie. can I specify a stereotype <<Frame>><<static_lib>> ? maybe better use the frame keyword?
One last wish: could it be possible to hide the stereotype name of a component/package/etc., through a skin ? The stereotype would serve as a "style name" in that case.
hide component <<static lib>> stereotype
skinparam component {
hide <<static lib>> stereotype
}
Rem: "factorizing" the SkinnedStereotype would make sense, but I can live without it.
skinparam component<<static lib>> {
hide stereotype
backgroundColor Red
}
Looks like pre-xmas time, with a lot in the wishlist, but who knows..
Thanks