Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-02 |
The matchMediaBehavior tag is a declarative way to define properties for a component for different @media rules. It uses the standard media queries and match them with the rules specified by each of the behavior tag. Once the rule matches, it applies the property defined through the behavior tag on the component and refresh the component to display the intended change. If the media query doesn't match, it fallbacks to a default value. This can be used to create responsive UIs where component aligns itself to the available width and height of the device. This behavior can be added under layout components or components that are capable of realigning on PPR.
Syntax of a media query is:
media_query: [[only | not]? <media_type> [ and <expression> ]*]
| <expression> [ and <expression> ]*
expression: ( <media_feature> [: <value>]? )
media_type: all | aural | braille | handheld | print
| projection | screen | tty | tv | embossed
media_feature: width | min-width | max-width
| height | min-height | max-height
| device-width | min-device-width | max-device-width
| device-height | min-device-height | max-device-height
| aspect-ratio | min-aspect-ratio | max-aspect-ratio
| device-aspect-ratio | min-device-aspect-ratio | max-device-aspect-ratio
| color | min-color | max-color
| color-index | min-color-index | max-color-index
| monochrome | min-monochrome | max-monochrome
| resolution | min-resolution | max-resolution
| scan | grid
This example will illustrate that the arrangement of bullets changes as the width of screen reduces