skinparam DefaultFontColor overwrittes all existing font color definitions (old version was working)

0 votes
asked Feb 26, 2022 in Bug by kirchsth (5,860 points)

Depending on the positon in file "skinparam DefaultFontColor" overwrites the other font colors, eg the "red container" should remain red


' here it works
' skinparam DefaultFontColor blue

skinparam rectangle<<RedContainer>> {
    StereotypeFontColor red
    FontColor red
    BackgroundColor lightred
    BorderColor darkred
    RoundCorner 0
    DiagonalCorner 18

' here it fails
skinparam DefaultFontColor blue

rectangle "==red container" <<RedContainer>> as rC
rectangle "==default container" <<container>> as r

In older versions it was working

BR Helmut

1 Answer

0 votes
answered Feb 26, 2022 by plantuml (295,000 points)
selected Feb 27, 2022 by kirchsth
Best answer
Is it a big issue for you?
We try to keep ascending compatibility, but this one is going to be difficult to solve, because now skinparam are evaluated as <style> directive under the hood. And order does matter with <style>
commented Feb 26, 2022 by kirchsth (5,860 points)
edited Feb 27, 2022 by kirchsth

Sorry this doesn't help. It is a big issue for me

  • my problem is that I want to reassign new styles to the C4 Sketch Layout, details see here. And I have to call the style macro "in the digram area" any not before the includes are called, therefore the order is important for me.
  • additional I aggree that order matters but I change only the default color and not a specific color and therefore I assumed the specific (color) should win in any case (like a normal HTML CSS).

Do you have another workaround for me?
BR Helmut

PS.: If you compare it with HTML CSS then you see that the body style does not replace the more specific area1 style (which was defined before the body style)

commented Feb 27, 2022 by plantuml (295,000 points)
OK, we are going to think about a solution for this.
commented Feb 27, 2022 by plantuml (295,000 points)
So this is fixed in last online version :-)

Sorry about all those changes, those steps are uncomfortable but needed to improve future development of PlantUML.

Thanks again for your help in testing.
commented Feb 27, 2022 by kirchsth (5,860 points)
Thank you for the fix, it works in C4 context too.
BR Helmut