Defining a style

Styles can be defined to be global (for all elements), for an element in general, or for specific types of an element.

Style names

In the definition of a style, the 'name' attribute is used as a selector to apply style attributes to graphical elements.

You can define a style as global or specific to a class of graphical object:

Style selection order

When different styles can be applied to an element, the following priority, from the most precise to the most generic, is used to determine the style definition to be applied:

  1. element-type.style-name
  2. .style-name
  3. element-type
  4. *

For instance, to find the style which will be applied to an Edit having the style attribute set to 'mandatory', the following styles will be analyzed:

  1. Edit.mandatory
  2. .mandatory
  3. Edit
  4. *