Pseudo selectors

Pseudo selectors can be used to apply style only when some conditions are fulfilled.

Pseudo selectors are preceded by a colon and can be combined:

<Style name="Table:even:input" >
<Style name="Edit:focus" >
<Style name="Edit.important:focus" >

When combining several pseudo selectors, the style will be applied if all pseudo selector conditions are fulfilled.

Depending on the type of the front-end, some pseudo selectors are meaningless, or unsupported. See the table below to check which pseudo selectors are supported on your front-end platform.

Pseudo selectors have different priorities; the style with the most important pseudo selector will be used when several styles match.

Table 1. Pseudo selectors for presentation styles
Priority Pseudo selector Condition
1 focus

The widget has the focus

2 query

The widget is controlled by a CONSTRUCT dialog

3 display

The widget is controlled by a DISPLAY ARRAY dialog

4 input

The widget is controlled by an INPUT ARRAY or INPUT dialog

5 even

This widget is on an even row in a TABLE or TREE

Important:

Prefer the alternateRows style attribute over the :odd and :even pseudo selectors, which are rendered less efficiently.

6 odd

This widget is on an odd row in a TABLE or TREE

Important:

Prefer the alternateRows style attribute over the :odd and :even pseudo selectors, which are rendered less efficiently.

7 inactive

The widget is inactive

8 active

The widget is active

9 message

Applies only to text displayed with the MESSAGE instruction

10 error

Applies only to text displayed with the ERROR instruction

11 summaryLine

Applies only to text displayed in AGGREGATE fields of tables