Next: , Previous: , Up: Style Sheets Implementation   [Contents][Index]


7.6.4 Inheriting from Other Style Sheets

It is possible to extend an existing style. The syntax is:

ancestors are
   ancestor_1[, ancestor_2...]
end ancestors

where ancestor1 etc. are style sheet keys.

For semantics, the rules are the following:

As an example, both C++ and Objective C style sheets extend the C style sheet:

style "Objective C" is
#[...]
ancestors are
   c
end ancestors
#[...]
end style

To the biggest surprise of the author, mutually dependent style sheets do work!