Styles and inherited styles
A style can inherit from another style. This enables you to specify a common style and derive other styles from it.
In the sample above, the address style inherits all style items from body in addition to style items specified in the address style itself. The same is true for the paragraph style. Style items in the child nodes override any inherited items from the parent node if there is a conflict.
Styles inherited from parent nodes
Besides inheritance from one style to another, inheritance is also supported between nodes that use styles.
In the (partial) project shown above, a style called TableStyle is specified on the Table node. If no other style is specified on the Row and Cell 1 nodes, these nodes will automatically use the TableStyle style.
If a style is specified on the Cell 1 node (e.g. CellStyle), the settings specified in CellStyle will be used for the Cell 1 node. If a style setting such as a font or color is not specified in CellStyle or one of the parent styles of CellStyle, the setting inherited from TableStyle will be used.
Style inheritance rules
Style items will be used in the following order:
- Items specified in Customize style
- Items specified in the style identified by Predefined style name
- Items specified in parent styles of the style identified by Predefined style name
- Items specified in the first parent node that also uses styles.