Styles

MyMobileWeb has adopted CSS style sheets as the mechanism for specifying presentation aspects (look and feel, etc.) with respect to visual controls. Each XML presentation file might be linked to one or more style sheets which must follow the CSS syntax. The properties and selectors that can be used are those specified in W-CSS plus some specific extensions defined by MyMobileWeb.

MyMobileWeb fully supports the cascading pattern for applying the style sheets. For instance, developers can specify a default style sheet that will apply to all the XML files. Moreover, MyMobileWeb provides default CSS files that are applied when no style is specified by programmers.

From a device independence perspective, the most important point is the style overriding feature. Using this feature a developer can change specific style properties of a presentation depending on the delivery context. For example, if a developer realises that a background color is not readable on a device, she can easily change it for one another more suitable, by means of style overriding and without needing to change anything in the XML definition file.

Tags: none