Renderer Media Variables
The following variables are available to a workflow (as arguments) or to external JavaScript by vmModelsRef. These variables may be useful to JavaScript or workflows that have to make decisions about the HTML to render for different size screens.
All the following media variables are true when the condition is satisfied on the current device's screen.
Variable | Description |
---|---|
xsMedia
|
Maximum width is 599px |
gtxsMedia
|
Minimum width is 600px |
smMedia
|
Minimum width is 600px and maximum width is 959px |
gtsmMedia
|
Minimum width is 960px |
mdMedia
|
Minimum width is 960px and maximum width is 1279px |
gtmdMedia
|
Minimum width is 1280px |
lgMedia
|
Minimum width is 1280px and maximum width is 1919px |
gtlgMedia
|
Minimum width is 1920px |
xlMedia
|
Minimum width is 1920px |
landscapeMedia
|
Media is in landscape mode |
portraitMedia
|
Media is in portrait mode |
printMedia
|
Media is print media |
isMobile
|
Media display is a mobile device Example: If a condition in JavaScript sets different classes or different HTML, the attribute |
When these variables have a suffix of Neg
, they are the opposite, that is to say, xsMedia
is true, means xsMediaNeg
is false.