The principles of inheritance and overriding
apply to style rules. This allows you to write default rules for
all model objects of a certain type and then to refine the
customization with more specific rules that apply to subsets of
these model objects.
The priority of a style rule depends on how specific it is and on
the order with respect to other style rules of the same
specificity. In general, a rule with more components in its selector has a higher priority because it is
more specific. Note that a more specific rule sets property values
for some model objects but not for others. When the specificity of
two rules is the same, the lowest rule in the tree has priority.
Different rules apply to different groups of objects, but several
rules can apply to the same object. If the same property is set on
one object in several rules, only the setting in the rule with the
highest priority is retained; this rule overrides
all the previous ones.
To style a model object, the Designer sorts
all rules that match it in priority order, and then applies the
settings they contain to the graphic object representing the model
object.