Selectors identify the element that is to be styled and can comprise of a Element, an object Name or an object Extra. Additionally styles can be assigned at Platform level if required.
| Selector | Prefix | Description |
|---|---|---|
* |
none | Default style applied to all objects |
<element> |
none | Style applied to all objects of an element |
~<platform> |
Tilde | Style applied to platform |
#<name> |
Hash | Style applied to object with unique name |
.<extra> |
Period | Style applied to all objects with this "Extra" name |
Selectors must be applied in order to enable them, however they do not all need to be included. For example the following selectors are all valid:
* {}
textarea~linux {}
textarea#username {}
\#username.central {}
An element is the object type of a MaxGUI gadget equivalent to the value returned by gadgetClass(). For additional gadgets the Element name will be the Class Type (Reflection is used to obtain this).
Standard Element Selectors
As of Version 1.0 there are three platforms defined. These can be identified in your stylesheet prefixed with the Tilde character.
Standard Platform Selectors
Platform selectors can be used in the following ways:
~windows#name
~windows#name.extra
~windows.extra
textfield~windows {}
textfield~windows#name {}
textfield~windows#name.extra {}
Name is identified in the selector by use of a hash sigh "#" and represents the unique gadget.name property of a MaxGUI gadget.
Extra is identified in the selector by use of a period "." and represents a string of the gadget.extra property of a MaxGUI gadget. This is equivalent to a Class in Cascading stylesheets.