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.
| Priority | Pseudo selector | Condition |
|---|---|---|
| 1 | focus |
The widget has the focus |
| 2 | query |
The widget is controlled by a |
| 3 | display |
The widget is controlled by a |
| 4 | input |
The widget is controlled by an |
| 5 | even |
This widget is on an even row in a Important:
Prefer the |
| 6 | odd |
This widget is on an odd row in a Important:
Prefer the |
| 7 | inactive |
The widget is inactive |
| 8 | active |
The widget is active |
| 9 | message |
Applies only to text displayed with the |
| 10 | error |
Applies only to text displayed with the |
| 11 | summaryLine |
Applies only to text displayed in |