Style inheritance works.

@startuml
<style>
.BaseStyle {
BackgroundColor Green
FontColor White
LineColor Gold
}
.FirstDerivedStyle {
' Inherits from BaseStyle implicitly when applied after it
FontColor orange
LineColor red
}
.SecondDerivedStyle {
' Inherits from BaseStyle implicitly when applied after it
LineThickness 3 ' Adds a new property not in BaseStyle
LineColor blue
}
</style>
' Hide the stereotype labels for cleaner output
hide <<BaseStyle>> stereotype
hide <<FirstDerivedStyle>> stereotype
hide <<SecondDerivedStyle>> stereotype
' Define classes with the styles applied via stereotypes
class BaseExample <<BaseStyle>> {
+method()
}
class FirstExample <<FirstDerivedStyle>> {
+method()
}
class SecondExample <<SecondDerivedStyle>> {
+method()
}
' Apply BaseStyle first, then override with FirstDerivedStyle
BaseExample <|.. FirstExample
BaseExample <|.. SecondExample
@enduml