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

0 votes
asked Feb 26 in Bug by kirchsth (2,880 points)

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

@startuml

' 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
@enduml



In older versions it was working

BR Helmut

1 Answer

0 votes
answered Feb 26 by plantuml (276,340 points)
selected Feb 27 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 by kirchsth (2,880 points)
edited Feb 27 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 by plantuml (276,340 points)
OK, we are going to think about a solution for this.
commented Feb 27 by plantuml (276,340 points)
So this is fixed in last online version :-)

https://www.plantuml.com/plantuml/uml/PO_1IWD138RlUOhGYtWGz2RIbkAMFa1zWhY9ux3PJCbcG17VtTAnrRPp_Bxvm_-lfY2FEYfCGxOTEOteqWTPKfdFjy9TiQ1iuiibVW7ktqk8IudFdMpshYjQ75tuuAx9C_L3ybAD6zUStkCaYxDu4qm-7Fcs_NSJn_i3MMTAnKX_uSCZV0FSu2P_2EFJtUs__cjvewhnL-LLgm2SPk5iiN1Xx8_BPdYrb2RqxZp2xUnvhB_8m4gCwwW_

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 by kirchsth (2,880 points)
Thank you for the fix, it works in C4 context too.
BR Helmut
...