Another solution...
If you does not use stereotype on class, with new style functionality is:
@startuml
hide stereotype
<style>
/' Bold Header '/
.bh {
header {
fontstyle bold
}
}
</style>
class "ClosedIssueState" as ClosedIssueState <<bh>> #lightgreen {
getString : string
transitionNew() : void
transitionWork() : void
transitionConfirmed() : void
}
ClosedIssueState -> B
@enduml
If that can help,
Regards.