using <style>, not skinparam, how can I alter the fontproperties of groups in component diagrams?

0 votes
asked Jul 8, 2021 in Question / help by bklaase (140 points)

Using code:

@startuml
<style>

componentDiagram {
  fontcolor green
  group {
  'font reletated properties don't seem to take
    fontstyle normal
    fontcolor green

  'this property clearly works
    backgroundcolor lightblue
  }
}

</style>

node someGroup {
  component component_a
}
@enduml


preview in online server

I cannot figure out the correct way to alter the font properties of groups.

commented Jul 8, 2021 by The-Lu (64,760 points)
edited Jul 19, 2021 by The-Lu

Hello B.,

It is a bug...

As:

@startuml
<style>
componentDiagram {
  fontcolor green
  group {
  'font reletated properties don't seem to take
    fontstyle normal
    fontcolor green

  'this property clearly works
    backgroundcolor lightblue
  }
  node {
  'font reletated properties don't works for group
    fontstyle normal
    fontcolor green

  'this property don't works for group
    backgroundcolor palegreen
  }
}
</style>

node someGroup {
  component component_a
}
node alone
@enduml

See similar request here:

→ The main question is: how are manage styles for group or for individual nested shape?
See example:


[See on online server]

Regards,
Th.

commented Jul 19, 2021 by bklaase (140 points)
Thanks for commenting! On the linked similar request I saw it stated that the behavior is fixed in the beta and online server, but this does not yet seem to be the case (or I am misunderstaning the intended behavior). It still seems impossible to style some properties of the nesting element (a node element in this case).
commented Jul 19, 2021 by The-Lu (64,760 points)

Hello B.,

You are right.

It ok for 'simple **empty** nested package', but not for 'nested package'

See also:

If that can help,
Regards,
Th.
commented Jul 19, 2021 by bklaase (140 points)
Yes that post is very clear and discribes the issue well. Thank you for being so active.

1 Answer

0 votes
answered Feb 3, 2022 by The-Lu (64,760 points)

This is now corrected on V1.2022.1+ (1rst Feb, 2022).

Using directly the shape name, node or package...

Thank to PlantUML team, yes
Regards.

...