Altova MobileTogether Designer

Priority across Style Sheets

Home Prev Top Next

The question of priority also arises when there are multiple definitions (at different levels, and in different style sheets) for a single style property, and when more than one of these definitions applies to the style property of a single design component. In this case, MobileTogether will look through definitions for this property at the various style sheet levels in the order given below. The first one to match is the one that is used. The table below uses the example of the background color property on a Button control.

 

 

Background color defined on the button control in the design

Highest Priority

If the button control in the design references Stylesheet-1

 
 
 
 

 

 
 
 

Background color defined for Button controls in Stylesheet-1

Background color defined for All controls in Stylesheet-1

Background color defined for Stylesheet-1

If the button control is in a table that references Stylesheet-2

Background color defined for Button controls in Stylesheet-2

Background color defined for All controls in Stylesheet-2

Background color defined for Stylesheet-2

If the button control's parent page references Stylesheet-3

Background color defined for Button controls in Stylesheet-3

Background color defined for All controls in Stylesheet-3

Background color defined for Stylesheet-3

Background color defined for Button controls in the Project style sheet

Background color defined for All controls in the Project style sheet

Background color defined for the Project style sheet

Lowest Priority

 

 

If the property value is defined via an XPath expression, note the following:

 

If the expression evaluates to an empty sequence, then the list is searched from top to bottom.

If the expression is defined for a property that takes a Boolean value (such as the properties visibility, bold, and italic), any return value that is not true is, according to the rules of XPath, a value of false. As a result, the list is not searched further.

 

Platform default values

Each mobile device platform (Android, iOS, Windows) has default values for certain style properties. For example, the default page background color of an iOS device might be white, whereas that of an Android device might be black. Note, however, that platform defaults are not available for all properties. You can use the Set Platform Default Value command to set a property value to the platform default of that property. Platform default values can be set at the following definitions levels:

 

Directly on a design component: Right-click a design component's property definition in the Styles and Properties Pane, and select Set Platform Default Value.

On a property in a style sheet: Right-click a property that is defined at any style sheet level (Project, All Controls, specific control type, table, and page), and select Set Platform Default Value.

 

Like any other style definition, platform default values can override values that are defined relatively farther away (from the component), and can be overridden by style definitions that are relatively closer to the component.

 

© 2018-2024 Altova GmbH